I am trying to create a list of dataframes and concatenate them as follows:
columns=df.columns.to_list()
variables = locals()
for i in np.arange(9):
variables["df_{0}".format(i)] = ([variables[df.loc[df[columns[i]].str.contains('word')]]])
dftot=pd.concat=variables["df_{0}".format(i)]
And I am getting this error: TypeError: 'DataFrame' objects are mutable, thus they cannot be hashed
Thank you