Is it possible to use TQDM progress bar when importing and indexing large datasets using Pandas?
Here is an example of of some 5-minute data I am importing, indexing, and using to_datetime. It takes a while and it would be nice to see a progress bar.
#Import csv files into a Pandas dataframes and convert to Pandas datetime and set to index eurusd_ask = pd.read_csv('EURUSD_Candlestick_5_m_ASK_01.01.2012-05.08.2017.csv') eurusd_ask.index = pd.to_datetime(eurusd_ask.pop('Gmt time'))
tqdm derives from the Arabic word taqaddum (تقدّم) which can mean "progress," and is an abbreviation for "I love you so much" in Spanish (te quiero demasiado). Instantly make your loops show a smart progress meter - just wrap any iterable with tqdm(iterable) , and you're done!
Find length by getting shape
for index, row in tqdm(df.iterrows(), total=df.shape[0]): print("index",index) print("row",row)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With