Spaces:
Running
Running
import pandas as pd | |
def read_csv_and_calculate_total_sales(file_path): | |
# Read the CSV file | |
df = pd.read_csv(file_path) | |
# Calculate total sales | |
total_sales = (df['Sales'] * df['Price']).sum() | |
return total_sales | |
# File path to the CSV file | |
file_path = '/workspaces/gaia-agent-python/deployment-ready/7bd855d8-463d-4ed5-93ca-5fe35145f733.xlsx' | |
# Calculate total sales | |
result = read_csv_and_calculate_total_sales(file_path) | |
# Print the result | |
print(result) |