Python Forum
Convert dataframe string column to numeric in Python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Convert dataframe string column to numeric in Python
#2
Did you even look at the docs? read_csv takes a parameter dtype that lets you specify the types of the columns: https://pandas.pydata.org/docs/user_guid...-csv-table.
Reply


Messages In This Thread
RE: Convert dataframe string column to numeric in Python - by ndc85430 - Mar-14-2020, 10:07 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  concat 3 columns of dataframe to one column flash77 2 859 Oct-03-2023, 09:29 PM
Last Post: flash77
  HTML Decoder pandas dataframe column mbrown009 3 1,064 Sep-29-2023, 05:56 PM
Last Post: deanhystad
  attempt to split values from within a dataframe column mbrown009 8 2,396 Apr-10-2023, 02:06 AM
Last Post: mbrown009
  New Dataframe Column Based on Several Conditions nb1214 1 1,824 Nov-16-2021, 10:52 PM
Last Post: jefsummers
  Putting column name to dataframe, can't work. jonah88888 1 1,846 Sep-28-2021, 07:45 PM
Last Post: deanhystad
Sad ValueError: could not convert string to float badju 0 4,338 Jul-01-2021, 12:13 AM
Last Post: badju
  Setting the x-axis to a specific column in a dataframe devansing 0 2,045 May-23-2021, 12:11 AM
Last Post: devansing
  Convert several columns to int in dataframe Krayna 2 2,426 May-21-2021, 08:55 AM
Last Post: Krayna
Question [Solved] How to refer to dataframe column name based on a list lorensa74 1 2,282 May-17-2021, 07:02 AM
Last Post: lorensa74
Question Pandas - Creating additional column in dataframe from another column Azureaus 2 2,993 Jan-11-2021, 09:53 PM
Last Post: Azureaus

Forum Jump:

User Panel Messages

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