(Nov-26-2022, 05:23 PM)astral_travel Wrote: although i got the wanted result, it produced the file i want with only one of the columns (the Ticker column), but why in the IDE it gives me this error ?The loop make litte sense,this dos the same
df['Ticker'].to_csv('/home/tal/investing/Ticker.csv', index=False)The varibale
columnSeriesObj
is created 3 times in the,where only the last one is used.The
columnSeriesObj.values
just print the same values 3 times.In Pandas so is using loops in many/most cases the wrong soution as should use a
vectorized solution
(that's build-in and there are many)So Pandas is a
diffrent way to program
than the standar Python way,you are new to both so it's can be confusing.Can look 30 Methods You Should Master To Become A Pandas Pro
See that not once is a
for loop
used.