I need help for using python pandas. I have a A.txt which has these data (this is an example)
0003343 01901310 8193910 91931 9183131 89102010 7373819 83003 3692429 92920202 and B.txt
424u20u 092u9j 902u39 9293u2 9u193jj 901u39 jdo910 903u98 ue9un88 So for A.txt I did the following and it does print the dataframe with number of column on top
import pandas as pd fileRead = pd.read_csv("A.txt", delim_whitespace = True, header=None, dtype=object) print fileRead the result
0 1 2 3 0 0003343 01901310 8193910 91931 1 9183131 89102010 7373819 83003 2 3692429 92920202 NaN NaN but if I do the same with B.txt, it gave me error
pandas.errors.ParserError: Too many columns specified: expected 4 and found 1 I don't understand. It should be the same result. What should I do to solve this? Thank you for your help and suggestion.
read_fwfthen it skips the last line