Questions tagged as 'pandas'

1
answer

Avoid NaN values in dataframe in Python

How could I avoid NaN values when generating a graph with matplotlib in Python? I mean, I do not want to replace them, just do not take them into account. It is to generate bar and pie charts only with the valid values of a column. I would also...
asked by 08.06.2018 / 16:58
0
answers

DataFrame cell value grouped by 'groupby ()'

I have the following DataFrame of pandas that I call reacciones : Modelo Apoyo Grupo Fx Fy Fz 0 Reacciones 00 P1 G -1.0 0 162.0 1 Reacciones 00 P1 Q -3.0...
asked by 07.06.2018 / 13:59
0
answers

From RangeIndex to DatetimeIndex

I am analyzing the time series of an action (historical from 2000 to 2018) df.index Out[179]: RangeIndex(start=0, stop=4309, step=1) df.info [4309 rows x 5 columns]> type(df) Out[178]: pandas.core.frame.DataFrame I want to be able to b...
asked by 03.06.2018 / 12:51
0
answers

New column in pandas:

import pandas as pd df = pd.read_csv("C:/Users/Usuario/Desktop/algotrade/GFG.csv", sep=";", parse_dates=["Date"],dayfirst=True,index_col='Date') df.head(10) Out[131]: Open High Low Close Volume Date...
asked by 05.06.2018 / 17:10
0
answers

Time series with PANDAS

I am handling a Time Series of an action and I have a problem with my code. import pandas as pd df = pd.read_csv("C:/Users/Usuario/Desktop/algotrade/GFG.csv", sep=";", parse_dates=["Date"],dayfirst=True,index_col='Date') df.head(10) Out[131]...
asked by 05.06.2018 / 15:45
0
answers

Search data in a dataframe by rows and columns

I have a dataframe of 24000 lines and in two of the columns are the values to enter another table (by rows and columns). Once this value is obtained, it must be stored in a new column of% initial dataframe . I do it like this: i=0 for...
asked by 31.05.2018 / 22:24
0
answers

search and replace pandas python, filter with two values

I have two columns: from io import StringIO import pandas as pd csv =StringIO(u'''\ debit,move_id/id, 2002,32 2000,33 2001,34 2002,6166 2002,6166 2003,6541 2004,6166 2002,8089 ''') and I want to filter and change the values in debit when i...
asked by 16.05.2018 / 17:09
0
answers

Using DataFrame in Python

I have a data list that loads a DataFrame, on which mathematical calculations were made, but some of them are empty, is it possible to discriminate between them ?, I am currently using Python 2.7 and the Panda library.     
asked by 07.05.2018 / 23:20
1
answer

Convert Json to Dataframe

I have the following Json [{ "documentosVinculados": [ { "fechaCreacion": "2018-05-08T15:56:51-03:00", "fechavinculacionDefinitiva": "2018-05-08T15:56:51-03:00", "numeroDocumento": "PT-2018-21487012", "referencia"...
asked by 11.05.2018 / 15:31
2
answers

Pandas. Import all the columns of an Excel sheet in Jupyter Notebook

In an open book in Jupyter Notebook, I try to import all the columns of an Excel sheet (16), using the script file = "datos.xlsx" # Import the data df = pd.read_excel(file, sheetname = "Financiera", na_values = "n/a") The script works corre...
asked by 11.04.2018 / 00:20