Python Forum
help !!!! really new to this
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help !!!! really new to this
#1
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
Reply
#2
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.
buran likes this post
Reply
#3
And when you have an error, post the entire error message, including the traceback information.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020