Open vamseeachanta opened 3 months ago
Legacy code:
Look at functions:
Example usage:
save_data = SaveData()
example_data = {
"first_name": ["Jason", "Molly", "Tina", "Jake", "Amy"],
"last_name": ["Miller", "Jacobson", "Ali", "Milner", "Cooze"],
"age": [42, 52, 36, 24, 73],
"preTestScore": [4, 24, 31, 2, 3],
"postTestScore": [25, 94, 57, 62, 70],
}
df = pd.DataFrame(
example_data,
columns=["first_name", "last_name", "age", "preTestScore", "postTestScore"],
)
cfg = {"file_name": "test_file"}
save_data.df_to_table_as_docx(df, cfg)
Please review this podcast. Great Tables make data display in tables better is what this podcast goes through. I do not know the details. https://realpython.com/podcasts/rpp/214/?utm_source=notification_summary&utm_medium=email&utm_campaign=2024-07-26
Review existing code. DF can be formatted for rounding numbers font size can be defined? columns can be dropped per choice
Objective: Format a table with borders and save it in word page to fit
Overall process:
STEPS for CSV to DOCX:
See testcase csv file data below. https://github.com/vamseeachanta/assetutilities/blob/751472da008f5e7dce8ad2840c0e868077afc23f/src/assetutilities/tests/test_data/word_utilities/data