ValueError: DataFrame constructor not properly called! with pandas
def multiple_dfs(xyz_file, sheet, *args):
row=2 writer = pd.ExcelWriter(xyz_file, engine='openpyxl') df = pd.DataFrame({'user': ['A', 'B', 'C'], 'income': [50000, 60000, 53000]})df2 = pd.DataFrame({'amount': [200, 600, 2000],
'income': [50000, 60000, 53000]})df2.to_excel(author, sheet, startrow=row, index=False)df3.to_excel(author, sheet, startrow=0, startcol=0, header=None, index=False)
Running this command throwing an error ValueError: DataFrame constructor not properly called! and I am unable to figure it out, can someone help me over this?