I want to select rows that match a condition and write to a new csv file. Here's my code and some sample data and i'm sure the type of 'id' is string. It only gives me the header row in the new file.
import pandas as pd
df = pd.read_csv("data.csv")
df[(df['id'] == '48')].to_csv("out.csv", index=False)
I'm wondering where the problem is. Thanks for the help!

dfdataframe