import pandas as pd 

#$ELMO,timestamp,current(IQ in amps), motorSpeed (counts), comment, CR
# 1. Load data from a CSV file
df = pd.read_csv('data.csv')

# 2. Preview the first 5 rows
print(df.head())

# 3. Inspect data types and missing values
print(df.info())

# 4. Filter rows based on a condition
filtered_df = df[df['age'] > 30]

# 5. Group data and calculate mean
grouped_df = df.groupby('department')['salary'].mean()

# 6. Save modifications to a new file
df.to_csv('output.csv', index=False)