Questions tagged as 'pandas'

1
answer

Regenerate indexes in a pandas dataframe after deleting rows

I have a dataframe in Pandas with 30,000 records. len(data) returns 30000. At this df I delete certain rows and then, regenero (or so I think) you index them with: data.drop(icond1,inplace=True) data.reset_index(drop=True) len(data) r...
asked by 01.03.2018 / 16:32
1
answer

Create a dictionary from text from a dataframe

I have a DataFrame that is created from a txt file. I need to go through each row, find pairs of repeated words and calculate the frequency of appearance. I thought to create a dictionary that stores the pairs of words and with a counter go c...
asked by 28.02.2018 / 23:46
1
answer

How to group data from a DataFrame by several columns at the same time?

I'm doing a downtime analysis of a production line. I have a DataFrame in CSV format with the following columns: 'index', 'id_planta', 'fecha', 'linea', 'turno', 'Supervisor', 'CategoriaTM', 'CausaTM', 'duracionTM' Only the durationTM...
asked by 24.10.2017 / 20:58
1
answer

Read csv in pandas does not show me all values

I'm working with a CSV file that comes down from a URL. I keep it and even there everything is perfect. Once I want to read it and print the results it just shows me some. He puts me some ... ... ... and tells me how many lines I have but he doe...
asked by 02.10.2017 / 19:32
0
answers

Create a loop for a word counter on a list

The idea is that I have a list that takes out tweets in each refresh, so it is creating a list of new data with their dates, I have a word counter and in sum the expected result is to count the words and assign them to a list of dates that are b...
asked by 25.07.2017 / 03:18
0
answers

How is the correct way to do an iterable function

I have been working for a few days with a function that operates with data of 2 document .csv . There are many steps, but basically what it does is take identifying numbers (ID) that were categorized from lowest to highest according to the...
asked by 22.07.2017 / 04:49
1
answer

Error pandas and matplotlib could not convert string to float

I'm trying to draw on a graph the cell phone prices according to their models For now I have this import pandas as pd import csv import matplotlib.pyplot as plt import matplotlib.dates as mdates df1 = pd.read_csv('MercadoLibreMejor_items.c...
asked by 25.07.2017 / 20:58
1
answer

I can not convert a Json format into a csv table

I tried to convert a json to csv, I tried it directly with the library csv and also with pandas , but it tells me TypeError . This is my code: import urllib2, json url = "https://www.ncdc.noaa.gov/cdo-web/api/v2/stations"...
asked by 29.06.2017 / 09:39
0
answers

How do I transform a series that is in minutes to hours to perform my scatterplot?

I am working with two series in Pandas . Radiation with data every minute and Humidity with data every hour. I need to find the way to do the annual cycles and then perform a scatterplot, for this I need that my two series have the sam...
asked by 09.12.2016 / 18:58
1
answer

how to propose the following sentence in python?

I have an algorithm in which it is stated as such and I have to execute certain commands in python as the algorithm raises so I can not modify, how can I raise the following sentence? where An is an angle, and everything with the root...
asked by 28.06.2018 / 02:13