Python Forum
Sorting data with pandas
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sorting data with pandas
#1
Question 
I am working on an inventory software which use Optical Character Recognition (EasyOCR) to can a document. Now I got the problem of cleaning/sorting the data (using pandas). I want a csv file like this:

Quote:Article Number: Name:
56451748468434 Shoe
24564165165145 Boat
...


The data I got looks like this:
Quote:00605555
Retail Apple I2W USB Power Adapler
00605558
Lightning t0 USB Cable (2 m)
00605613
Apple Lightn t0
Smm Headphone
00805614
Apple iPhone Lightning Dock Black
0C605615
Apple EarPods wilh Lighining Con;
00605774
Huawei GigaCube LTE CPE Fenstera
00605806
Google Home
00605834
Belkin BOOSTUP Wireless Charger
00605872
Google Hame Mini

I tried:
data = pd.DataFrame(data['1'].values.reshape(-1, 2), columns=['Artikel', 'AN'])
But then my output looks like this:
Output:
Artikel AN 0 Retail Apple I2W USB Power Adapler 00605558 1 Lightning t0 USB Cable (2 m) 00605613 2 Apple Lightn t0 Smm Headphone 3 00805614 Apple iPhone Lightning Dock Black 4 0C605615 Apple EarPods wilh Lighining Con; 5


Any idea how I can clean/sort the data properly (only the numbers on one side and the name on the other side)?

Thank you! :)
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 689 Jan-06-2024, 03:55 PM
Last Post: deanhystad
  Data Sorting and filtering(From an Excel File) PY_ALM 0 1,054 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,270 Nov-14-2022, 01:46 PM
Last Post: jefsummers
Thumbs Up can't access data from URL in pandas/jupyter notebook aaanoushka 1 1,873 Feb-13-2022, 01:19 PM
Last Post: jefsummers
  Pandas Data frame column condition check based on length of the value aditi06 1 2,701 Jul-28-2021, 11:08 AM
Last Post: jefsummers
  [Pandas] Write data to Excel with dot decimals manonB 1 5,899 May-05-2021, 05:28 PM
Last Post: ibreeden
  pandas.to_datetime: Combine data from 2 columns ju21878436312 1 2,458 Feb-20-2021, 08:25 PM
Last Post: perfringo
  pandas read_csv can't handle missing data mrdominikku 0 2,508 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