I'm dealing with large files that doesn't fit in memory, as a result of that I'm using the iterator functionality of Pandas' Dataframe and processing single chunk each time.
pd.read_csv(csv_file_name, encoding='utf-8', chunksize=chunk_size, iterator=True,
engine='c', error_bad_lines=False, low_memory=False)
While processing I'd like to print the number of processed rows and the percentage of processed rows out of the total amount of rows.
To get the total amount of rows in a Pandas Dataframe I'm using
len(df.index)
But when trying to use it when using ierator I'm getting
AttributeError: 'TextFileReader' object has no attribute 'index'
Any way of doing that? (while not going over each chunk)