Skip to content
Snippets Groups Projects
Commit b479d877 authored by Martin Schrön's avatar Martin Schrön
Browse files

Reports: Allow for date index column

parent a35a9ef8
No related branches found
No related tags found
No related merge requests found
......@@ -220,6 +220,11 @@ class PDFReport(FPDF):
self.set_font(self.font_mono, size=7)
data["Date"] = data.index.strftime("%Y-%m-%d")
cols = list(data.columns)
cols = [cols[-1]] + cols[:-1]
data = data[cols]
data = data.astype(str)
columns = [list(data)] # Get list of dataframe columns
rows = data.values.tolist() # Get list of dataframe rows
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment