Python Forum
Sorting data with pandas
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sorting data with pandas
#4
Not sure what the data looks like exactly when you import, but I suggest using a try...except block, where you use int() on the string. If it passes, it's a number, if it throws the exception it is not.
Reply


Messages In This Thread
Sorting data with pandas - by TheZaind - Nov-15-2021, 06:58 PM
RE: Sorting data with pandas - by jefsummers - Nov-15-2021, 07:25 PM
RE: Sorting data with pandas - by TheZaind - Nov-15-2021, 07:40 PM
RE: Sorting data with pandas - by jefsummers - Nov-17-2021, 12:11 PM
RE: Sorting data with pandas - by aserian - Nov-22-2021, 07:33 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Thumbs Up can't access data from URL in pandas/jupyter notebook aaanoushka 1 797 Feb-13-2022, 01:19 PM
Last Post: jefsummers
  Pandas Data frame column condition check based on length of the value aditi06 1 1,576 Jul-28-2021, 11:08 AM
Last Post: jefsummers
  [Pandas] Write data to Excel with dot decimals manonB 1 2,755 May-05-2021, 05:28 PM
Last Post: ibreeden
  pandas.to_datetime: Combine data from 2 columns ju21878436312 1 1,656 Feb-20-2021, 08:25 PM
Last Post: perfringo
  pandas read_csv can't handle missing data mrdominikku 0 1,561 Jul-09-2020, 12:26 PM
Last Post: mrdominikku
  Pandas data frame creation from Kafka Topic vboppa 0 1,274 Jul-01-2020, 04:23 PM
Last Post: vboppa
  Generate Test data (.csv) using Pandas Ashley 5 1,954 Jun-15-2020, 02:51 PM
Last Post: jefsummers
  Read json array data by pandas vipinct 0 1,245 Apr-13-2020, 02:24 PM
Last Post: vipinct
  add formatted column to pandas data frame alkaline3 0 1,150 Mar-22-2020, 06:44 PM
Last Post: alkaline3
  pandas DataReader error on all data sources glidecode 5 15,457 Sep-25-2019, 02:10 PM
Last Post: perfringo

Forum Jump:

User Panel Messages

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