I have used pd.pivot_table in pandas dataframe, and the columns names becomes tuples like (\'A1\', \'B1\'), (\'A1\', \'B2\')... and I want them to
pd.pivot_table
(\'A1\', \'B1\'), (\'A1\', \'B2\')...
You can use df.DataFrame.Index.map for this:
df.DataFrame.Index.map
df1.columns.map(lambda t: t[0] + "_" + t[1])