python read tab delimited file

Solutions on MaxInterview for python read tab delimited file by the best coders in the world

showing results for - "python read tab delimited file"
Emely
21 May 2018
1import pandas as pd
2import codecs
3
4df = pd.read_csv(filename, sep='\t', lineterminator='\r')
5
6# To increase robustness, optionnal.
7doc = codecs.open('document','rU','UTF-16')
8
9df = pd.read_csv(doc, sep='\t')