Python Forum
help !!!! really new to this - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Homework (https://python-forum.io/forum-9.html)
+--- Thread: help !!!! really new to this (/thread-32208.html)



help !!!! really new to this - HarveerSahota - Jan-28-2021

HI, I have to take this required coding class and I am trying to follow a youtube video but i keep getting this error. I dont know what I am doing wrong.
I am typing this in:

column_names = [
'x',
'y',
'z',
't'
]

appendMe = pd.read_csv(file, names = column_names, sep='\t')

plt.plot(appendMe.x)

The error I am getting says "TypeError: 'value' must be an instance of str or bytes, not a float" Any help would be appreciated.
Thank you


RE: help !!!! really new to this - Marbelous - Jan-28-2021

You're obviously using pandas and matplotlib so there must be more to your code than you show us. Post the whole thing in code tags (the blue/yellow python icon) and also the complete traceback. It would also be good to know what's in the csv file and what exactly you expect the code to do.


RE: help !!!! really new to this - deanhystad - Jan-30-2021

And when you have an error, post the entire error message, including the traceback information.