I've created a list of dataframes for which I've to fetch the names of the same dataframes to use it to name the newly generated dataframes. I want to name the newly generated dataframes from the 'for-loop' similar to (signifying) their respective dataframe.
list_containing_dataframes = [Furnishings, Labels, Accessories, Binders, Supplies, Phones, Tables]
for i in list_containing_dataframes:
# some operations done on 'i' to generate new dataframes !
# let's save the newly generated dataframes!
newly_generated_dataframes.to_csv(str(i)+'_forecast' , index = False, encoding = 'utf-8')
# .to_csv() function is being used to save the dataframes in csv format in google colab!
# Expected - The name of newly generated dataframes to be 'name of dataframe #operated on'+'forecast'.
# example- Tables_forecast, where df_Tables is the name of Dataframe operated on!
# Error - str(i) in '.to_csv()' function prints the name along with the index column which becomes so long that it throws error 'name too long!'
# I just want the name of the dataframe along with string '_forecast' attached to it!