With imports of .csv files, I created the following df.
I try to delete the rows with NaN in the column "Iberdrola, using the loop.
if symbol == 'Iberdrola':
df = df.dropna (subset = 'Iberdrola')
When executing...
My idea is to move on from this
df2 = pd.DataFrame({'usuario': [1,1,1,2,2,2,3,3,3,3,3],
'evento': ["compro","compro","viopag","viopag","entropag","compro","entropag",
"compro","salio","viopag...
I have an error on line 23, it has been two hours and I still do not have the problem, this is a pie chart that shows the number of men and women in my excel file.
from math import pi
import pandas as pd
from bokeh.io import output_file, sho...
I have an excel with three columns, one is the family code, another the product code and the other the price of the product, so I would have something similar to this:
1. Familia Producto Precio
1. -------- --------- --------
1....
How can I iterate row by row in a dataframe using python:
For example, I have the following data:
canciones={'albun':['cacho','beto','pedrito','loshermanos'],
'ano':[1992,1998,1994,1993],
'tiempo':['00:22:04','00:42:02','00:23:33...
import pandas as pd
ds1 = pd.Series(np.random.randn(5)) #serie 1
ds2 = pd.Series(np.random.randn(5)) #serie2
print("Series1:")
print(ds1)
print("Series2:")
print(ds2)
print("Compare the elements of the said Series:")
print("Equals:")
print(ds1 ==...
s1 = pd.Series(['2', '4', '6', '8', '10'])
s2 = pd.Series(['1','3','5','7','9'])
s1+s2
0 21
1 43
2 65
3 87
4 109
As you observe what I get is a " concat " of the values, with their respective index and what I need i...
I have a list
I'm trying to iterate with a for loop in a dataframe to query a data in a webservice:
value=[]
for i in range(0, 10):
nit = mydataset_df.CO_tin_no
url = 'http://www.rues.org.co/RM/ConsultaNIT_json'
headers,...
Passing a csv to an array with pandas creates a column to the left of everything indicating the row number that it is. How could it be eliminated?
def cargar():
print("Indica la ruta donde se encuentra el CSV\n")
print("Si desea salir puls...
I have the following dataframe:
and I want to go through each line of the column "CO_tin_no" to consult it with a webservice
item=[]
for nit in mydataset_df.CO_tin_no:
nit = mydataset_df.CO_tin_no
url = 'http://www.rues.org.c...