Python Forum
Sorting data with pandas
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sorting data with pandas
#3
(Nov-15-2021, 07:25 PM)jefsummers Wrote: Looking at the data, first 6 lines alternate between number and description. Then you get 2 lines of description which is going to be problematic. If you try to filter by if numbers only it is the code, then one of the codes has a "C" in it which again is a problem.
You need to be able to describe how the program is to distinguish the columns, then you can try to program it.
Yeah, thank you, I fixed the problem with the 'C'. But how can I program it to sort it by numbers and on the other side all the text under it till a new number comes
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
  Grouping in pandas/multi-index data frame Aleqsie 3 691 Jan-06-2024, 03:55 PM
Last Post: deanhystad
  Data Sorting and filtering(From an Excel File) PY_ALM 0 1,056 Jan-09-2023, 08:14 PM
Last Post: PY_ALM
  Sorting data by specific variables using argparse Bearinabox 5 1,426 Jan-01-2023, 07:44 PM
Last Post: Bearinabox
Smile How to further boost the data read write speed using pandas tjk9501 1 1,272 Nov-14-2022, 01:46 PM
Last Post: jefsummers
Thumbs Up can't access data from URL in pandas/jupyter notebook aaanoushka 1 1,876 Feb-13-2022, 01:19 PM
Last Post: jefsummers
  Pandas Data frame column condition check based on length of the value aditi06 1 2,702 Jul-28-2021, 11:08 AM
Last Post: jefsummers
  [Pandas] Write data to Excel with dot decimals manonB 1 5,906 May-05-2021, 05:28 PM
Last Post: ibreeden
  pandas.to_datetime: Combine data from 2 columns ju21878436312 1 2,459 Feb-20-2021, 08:25 PM
Last Post: perfringo
  pandas read_csv can't handle missing data mrdominikku 0 2,510 Jul-09-2020, 12:26 PM
Last Post: mrdominikku
  Pandas data frame creation from Kafka Topic vboppa 0 1,952 Jul-01-2020, 04:23 PM
Last Post: vboppa

Forum Jump:

User Panel Messages

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