I have a pandas DataFrame named 'data_by_month'
Here is a dummy data:
data = {'date' : ['1', '2','3'],
'value1' : ['a', 'b' ,'c'],
'value2' : ['12','24','4']}
data_by_month = pd.DataFrame(data)
Now, as I work with this DataFrame, because I have other DataFrames to use alternatively (data_by_week or data_by_year), I defined another name for this DataFrame and use the new name throughout the work process, so I can just change the name once instead of changing all the names redundantly:
new_name = data_by_month
However, I don't know how I can get the DataFrame name as a string, 'data_by_month' in this case, regardless of which DataFrame is given.