Python Forum
pandas convert to tuple & float to float64
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pandas convert to tuple & float to float64
#6
Quote:the output is:float not float64.
You most store it in a variable.
four_64 = newfour_2['GDPDiff'].astype(np.float64)
As mention you convert with the build tuple() after you have used tolist().
    sixlist = df.to_records().tolist() 
    return tuple(sixlist) # Will return a tuple
answer_six()
Reply


Messages In This Thread
RE: pandas convert to tuple & float to float64 - by snippsat - Feb-27-2017, 10:30 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How can I convert specific rows from excel to pandas dataframe? mcva 1 1,841 Apr-20-2020, 09:14 AM
Last Post: pyzyx3qwerty
  Error could not convert string to float: deadendstreet 4 5,463 Oct-02-2019, 05:49 PM
Last Post: ichabod801
  ValueError: could not convert string to float: 'Pencil' Balakay97 3 5,958 Mar-08-2018, 07:30 PM
Last Post: sparkz_alot

Forum Jump:

User Panel Messages

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