I have a function that takes in two dataframes and a string as shown below but I can't quite figure out how to create a new dataframe where I want the name of the dataframe to be the string that I input into the function concatenated with a 'venue_df' at the end.
def basic_pivot(df1,df2,str):
if str=='first':
str+'venue_df'=df1.pivot_table(index=['venue_id','max'],
values=['match','name','continent','country'],
aggfunc={'match':'nunique','name':'last',
'continent':'first','country':'first'})
else:
None
return str+'venue_df'