need to find CLI for generating summary tables

This commit is contained in:
Hartmut Seichter 2024-05-28 09:05:20 +02:00
parent 4ed9804405
commit ef011cda55

View file

@ -117,24 +117,20 @@ class CourseBuilder:
# mm = Template("{'written':'S','oral':'mündlich'}[${v}]")? # mm = Template("{'written':'S','oral':'mündlich'}[${v}]")?
# print(mm.format(v=mm)) # print(mm.format(v=mm))
# lets get crazy to create a summary table!
df_summary = pd.DataFrame([{
'sum.credits': df_q['credits'].sum()
}])
# set labels # set labels
if args.query_labels: if args.query_labels:
df_q.columns = args.query_labels df_q.columns = args.query_labels
q_as_md = df_q.to_markdown(tablefmt='grid',index=False) q_as_md = df_q.to_markdown(tablefmt='grid',index=False)
print(q_as_md) print(q_as_md)
# # lets get crazy to create a summary table! print(df_summary.to_markdown(tablefmt='grid',index=False))
# df_summary = pd.DataFrame([{
# 'sum.credits': df_q['credits'].sum()
# }])
# print(df_summary.to_markdown(tablefmt='grid',index=False))
@staticmethod @staticmethod