Create list of dataframes
import pandas as pd array_len = 5
All elements of list reference the same df.
i.e. Assigning value to one df assigns to all df elements of array
df_array = [pd.DataFrame()]*array_len
Elements of list have unique df to assign values as needed
df_array = [] for i in range(array_len): df_array.append(pd.DataFrame())
Define list of unique dataframes
Effectively got only 1 dataframe defined
New contributor
Vamsee is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.