Python, Automation, Data Science, Artificial Intelligence, Llm.
the CSV file into a DataFrame df = pd.read_csv('sales_data.csv') # Display the first few rows of the DataFrame print(df.head()) # Calculate total sales by product category sales_by_category = df.groupby('Category')['Sales'].sum() print(sales_by_category) # Filter the DataFrame to include only sales