Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas convert tsv to dataframe

>>> df1 = DataFrame(csv.reader(open('c:/~/trainSetRel3.txt'), delimiter='	'))

Traceback (most recent call last):
  File "<pyshell#28>", line 1, in <module>
    df1 = DataFrame(csv.reader(open('c:/~/trainSetRel3.txt'), delimiter='	'))
  File "C:Python27libsite-packagespandascoreframe.py", line 318, in __init__
    raise PandasError('DataFrame constructor not properly called!')
PandasError: DataFrame constructor not properly called!
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pandas #convert #tsv #dataframe
ADD COMMENT
Topic
Name
6+5 =