Python, Automation, Data Science, Artificial Intelligence, Llm.
above a certain threshold high_sales = df[df['Sales'] > 1000] print(high_sales) # Create a new column based on a condition df['Discount'] = df['Price'].apply(lambda x: 0.1 if x > 50 else 0) print(df.head()) # Save the modified DataFrame to a new CSV file df.to_csv('updated_sales_data.csv',