-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample_usage.py
More file actions
19 lines (15 loc) · 811 Bytes
/
Copy pathexample_usage.py
File metadata and controls
19 lines (15 loc) · 811 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from data_processor import DataProcessor
if __name__ == "__main__":
# --- Example Usage For DataProcessor Class ---
processor = DataProcessor("sample_dataset.csv")
# Comment out to test optional filtering
# processor = DataProcessor(filepath="sample_dataset.csv", region="North")
# processor = DataProcessor(
# filepath="sample_dataset.csv", start_date="2023-01-16", end_date="2023-02-20"
# )
print(f'\nTotal sales: {processor.summarize_column("Sales")}')
print(f'Total profit: {processor.summarize_column("Profit")}')
print(f"Region with highest sales: {processor.region_with_highest_sales()}\n")
print(f"Total sales and profit per region:\n{processor.region_summary()}")
processor.save_summary()
processor.save_region_summary_plot("region_summary")