Answer the question
In order to leave comments, you need to log in
How to pass multiple pandas.dataframe in one variable?
I use pdf_reports
to generate pdf .
data_frames = pandas.DataFrame.from_records({
"NAME": name,
"DAY": day,
"MONTH": month,
"YEAR": year
},
columns=["NAME", "DAY", "MONTH", "YEAR"])
data_frames2 = pandas.DataFrame.from_records({
"NAME": name,
"DAY": day,
"MONTH": month,
"YEAR": year
},
columns=["NAME", "DAY", "MONTH", "YEAR"])
html = pug_to_html("RevenueReport.pug", revenue=data_frames, revenue2=data_frames2)
print(type(data_frames))#<class 'pandas.core.frame.DataFrame'>
filename = 'revenuereport.pdf'
write_report(html, filename)
Answer the question
In order to leave comments, you need to log in
No, but you can merge dataframes
https://pandas.pydata.org/pandas-docs/stable/user_...
Not familiar with pandas, but it seems to me that a nested dictionary will solve this complexity.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question