whereLearn how to use the where() function in pandas to filter rows based on specified conditions.
Use the where() function to filter rows where:
Age is greater than 30.
Replace values that do not meet the condition with NaN.
Display the rows of the filtered data.
Python Code:
filtered_age = df.where(df['Age'] > 30)
filtered_age