hello world foo handling missing values is an important and frequently nuanced part of the file parsing process missing data is usually either not present (empty stringor marked by some sentinel value by defaultpandas uses set of commonly occurring sentinelssuch as na- #indand nullin [ ]!cat ch /ex csv something, , , , ,message one, , , , ,na two, , ,, ,world three, , , , ,foo in [ ]result pd read_csv('ch /ex csv'in [ ]result out[ ]something one two nan three message nan world foo in [ ]pd isnull(resultout[ ]something false false false false false false false true false false false false message false true false false false false the na_values option can take either list or set of strings to consider missing valuesin [ ]result pd read_csv('ch /ex csv'na_values=['null']in [ ]result out[ ]something one two nan three message nan world foo different na sentinels can be specified for each column in dictin [ ]sentinels {'message'['foo''na']'something'['two']in [ ]pd read_csv('ch /ex csv'na_values=sentinelsout[ ]something message one nan nan nan world three nan reading and writing data in text format www it-ebooks info