python pandas: create multiple empty dataframes
You can't have many data frames within a single variable name, here you are trying to save all empty data frames in x. Plus, you are using wrong attribute name, it is pd.DataFrame and not pd.Dataframes.
I did this and it worked-
dfnames = ['df0', 'df1', 'df2']
x = [pd.DataFrame for x in dfnames]
I am trying to create multiple empty pandas dataframes in the following way:
dfnames = ['df0', 'df1', 'df2']
x = pd.Dataframes for x in dfnames
The above mentionned line returns error syntax.
What would be the correct way to create the dataframes?