Reading a text file

read_csv can help read text files as well. Often, data is stored in .txt files with different kinds of delimiters. The sep parameter can be used to specify the delimiter of a particular file, as shown in the following code:

data=pd.read_csv('Tab Customer Churn Model.txt',sep='/t')

The preceding file has Tab as a delimiter, which is specified using the sep parameter.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset