Python Forum
Inconsistent sorting with the .sort_values() function
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Inconsistent sorting with the .sort_values() function
#2
An example would be nice. My guess without any data is that your inflation numbers are strings, not floats. Sorting numerical strings gives funny results like 1000 is less than 2 because in the ascii table "1" is lower than "2".
Reply


Messages In This Thread
RE: Inconsistent sorting with the .sort_values() function - by deanhystad - Jun-28-2022, 04:26 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  ValueError: Found input variables with inconsistent numbers of samples: [5, 6] bongielondy 6 27,002 Jun-28-2021, 05:23 AM
Last Post: ricslato
  ValueError: Found input variables with inconsistent numbers of sample robert2joe 0 4,393 Mar-25-2020, 11:10 AM
Last Post: robert2joe
  ValueError: Found input variables with inconsistent numbers of samples: [0, 3] ayaz786amd 2 9,717 Nov-27-2018, 07:12 AM
Last Post: ayaz786amd

Forum Jump:

User Panel Messages

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