xxxxxxxxxx
time_sin_grad[time_sin_grad < 0] = 0
xxxxxxxxxx
import pandas as pd
# Creating a sample dataframe
data = {'Name': ['John', 'Emma', 'Mike', 'Sophia'],
'Age': [25, 30, 35, 40],
'Salary': [50000, 60000, 45000, 70000]}
df = pd.DataFrame(data)
# Condition: Changing Salary to 55000 where Age is greater than 30
df.loc[df['Age'] > 30, 'Salary'] = 55000
# Print the updated DataFrame
print(df)