I'm new to python and pandas. I'm trying to get a tsv
file loaded into a pandas DataFrame
.
This is what I'm trying and the error I'm getting:
>>> 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!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…