Questions tagged as 'pandas'

1
answer

Put data from an Excel spreadsheet in the database

The database here in the company generates an Excel report, I need to save this data in a database, initially sqlite3, to be able to display this data in a Django template in the future. Example of exel: Nome do profissional,"Situação atual...
asked by 27.02.2018 / 17:04
0
answers

How to determine the maximum value of one column for a range of data in another column?

I need to determine the maximum monthly flows, however I'm not able to reorder columns in date term and flows as column data.     
asked by 17.02.2018 / 20:46
0
answers

Comparing two data frames in python

Good evening, gentlemen. I'm new to python, and programming. I'm trying to compare two different data frames, each one with the data of cars of a specific year. For now I've done the following: year_08 = np.repeat('2008', 1061) # Variável c...
asked by 02.02.2018 / 21:02
1
answer

Pick up data in pairs in lines in sequence

I'm reading a csv worksheet with pandas through pd.read_csv() . The worksheet contains vehicle location data at any time. For example:    Location 1: Latitude a, Longitude a   Location 2: Latitude b, Longitude b   Loca...
asked by 11.01.2018 / 15:19
1
answer

Python pandas formatting

import numpy as np import pandas as pd ID = [i for i in range(1,101)] def tabela(imc): if imc < 18.5: return 'Abaixo do peso' elif imc < 25 and imc >= 18.5: return 'Saudável' elif imc < 30 and imc >= 25:...
asked by 09.01.2018 / 02:52
0
answers

AttributeError: 'NoneType' object has no attribute 'fileno'

Good morning! I'm starting my studies on python-pandas, and I have a problem that seems like simple resolution. But not for me. Still. I'm following this tutorial: link I can create the dataframe, but when trying the command "df.loc [df.AAA...
asked by 20.12.2017 / 12:59
0
answers

web2py - show variable value with data from a .csv file in view

I have a web2py framework project called ucsalPY with an application called ucsal. The application path is: ucsalPY/application/ucsal (/controllers, /models, /views) In the default.py controller I created the method: nomes={"nome": ['P...
asked by 25.11.2017 / 21:38
1
answer

Error accessing dictionary index

I creating a program to read from a file csv a set of coordinates and store them in a DataFrame object. The code is below df = pandas.read_csv(os.getcwd() + "/Coordinates.csv") print(df["Longitude"]) The csv file is as follows...
asked by 09.11.2017 / 00:30
1
answer

How to copy a specific line of date frame to another date frame

I have following Data Frame: data = { 'País': ['Bélgica', 'Índia', 'Brasil','Índia','Bélgica','Bélgica','Russia','Brasil'], 'Capital': ['Bruxelas1', 'Nova Delhi', 'Brasília', 'Nova Delhi','Bruxelas2','Bruxelas3','Moscou','Brasília'], 'Continen...
asked by 09.10.2017 / 17:43
1
answer

I'm trying to make my chart start from position 0 using hist ()

Using USAGE_PLOT is easy to do but I want to do and learn how to use hist. the same way it is in the image below in which it was used usage_plot(trip_data, 'duration', ['duration < 60'], boundary = 0, bin_width = 5) ButI'mtryingsever...
asked by 18.09.2017 / 00:24