Unable to read .txt file with pandas' IO tools

#1

Hello everyone ,
So i was trying to read a .txt file , to analyse its data , i tried different pandas readers such as :
redwood = pd.read_fwf(‘https://scipython.com/static/media/problems/P2.6/redwood-data.txt’, header = None, skiprows = [0,1])

and :
redwood = pd.read_csv(‘https://scipython.com/static/media/problems/P2.6/redwood-data.txt’, header = None, skiprows = [0,1], delimiter = ‘\t’)

Still , that didn’t work , it would give me a one column dataframe.
I don’t know if the file is biased , or i’m not using the right tools .

I’m here asking for help !
Thank you .

#2

Hi nacifquant, I just tried and your second piece of code seems to work for me. What error are you getting?

#3

Hello @natashawatkins , thank you for your reply
i tried the second code again , and it worked as you said !
i think i just had a problem in my jupyter notebook , thank you for pointing this out .