Python Forum

Full Version: pandas dataframe
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a file Test.csv as below
ColumnA
FM
NA
EC

When run code below, it shows nan, not 'NA'. how to fix it? Thanks
FM
nan
EC

import pandas as pd
df = pd.DataFrame(pd.read_csv('Test.csv'))
for s in df['ColumnA']:
    print(s)
pd.read_csv('Test.csv', na_filter = False)