Questions tagged as 'dataframe'

1
answer

Pandas: comparing information in DataFrame

I have 2 DataFrames imported from CSV CSV1 4616; CCIVIL_03/decreto/2003/D4616.htm 4617; CCIVIL_03/decreto/2003/D4617.htm 4618; CCIVIL_03/decreto/2003/D4618.htm 4619; CCIVIL_03/decreto/2003/D4619.htm 4620; CCIVIL_03/decreto/2003/D4620.htm 46...
asked by 06.06.2018 / 19:15
2
answers

How to transpose rows to columns in a data frame?

I have a time series with daily precipitation data between 1961 and 2017, as shown below. I need to bundle this data by month over the years. I was able to transpose the month column of the data frame and fill it with the values in the "prec" co...
asked by 01.04.2018 / 21:20
1
answer

string treatment in pandas

Good Night Sirs, I have the following Dataframe, imported from an xlsx. NUM_LEGISLACAO DSC_URL COD_SITUACAO ... DSC_TIPO num ano 264 89.272/1984 NaN 2.0 ... NORMATIVO 89.272 1984 265 90.396/1984 N...
asked by 15.06.2018 / 17:58
1
answer

Copy part of the Dataframe where column is Null or NaN

I have the following question. I have the following sample dataframe: import pandas as pd df = pd.DataFrame({'A' : [4,5,13,18], 'B' : [10,np.nan,np.nan,40], 'C' : [np.nan,50,25,np.nan], 'D' : [-30,-50,10,16], 'E' : [-40,-50,7,12]}) Df...
asked by 22.11.2018 / 20:13
1
answer

How to insert a row in a DataFrame Pandas in the middle of other rows?

I have a sensor data output that has the following structure: --- Home --- $ LAGM, Colar03, Yellow, 32262, -31226, -5120, -104,40,190,1662.00,1670.00,236.00, MGAL $ GPGGA, 113203,181,206,6812, S, 05443,4264, W, 1,03,3,4,0,0, M, 4.8, M ,...
asked by 31.07.2018 / 18:28
1
answer

Pandas: Create Multiple Columns in the DataFrame

I have a spreadsheet with the following information: NUM_LEGISLACAO DSC_URL ... COD_TIPO DSC_TIPO 0 323/1895 NaN ... 2.0 CONCRETO 1 2.269/1896 NaN ... 2.0 CONCRETO 2 2....
asked by 27.05.2018 / 00:23
1
answer

How to save averages from a dataframe, a new column containing the averages of this dataframe using pandas?

Good evening, I'm having a problem trying to save average values of a df, in a single column. An example of how I wanted it to be was: Dataframe Inthisfirstpart,Ijustopenedmydataframeandtranspiredtogetthemean()valueswiththemean()function...
asked by 22.05.2018 / 01:28
1
answer

How can I construct a table result using "eventReactive" in shiny

How can I create a "table result" for each relationship I chose in the selectInput "Col" and "Row"? Dinamicaly, for each time you press the 'ok' button. library(shiny) shinyUI(fluidPage( h4("Give a valor between 0 to 5, to each col/row relat...
asked by 15.03.2018 / 16:54
1
answer

Add column to a dataframe based on sorting done in another dataframe

Greetings! I have two dataframes. Both have columns that determine ranges, with maximum and minimum numbers. In each dataframe the ranking of each range is done one way. I wanted to make a new column in the second dataframe with the rating accor...
asked by 31.01.2018 / 01:52
0
answers

Incomplete tweets in search of searchTwitter method

Hello, the Stackoverflow BR community, I'm playing with the twitteR library of the programming language R , and I realize that in the searches I've performed, the texts are cut , example: "RT @ fulaniinn2070 I do not believe that after...
asked by 14.09.2018 / 23:57