Python Forum
How to put data into a right variable -CSV
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to put data into a right variable -CSV
#1
I have exported some data to CSV from a PDF file using PDF multitool.

Sample file of the CSV data

There are some errors in the CSV as it want properly comes into right column.

I have kept only the first page headers as the other pages headers also not in right order, so ignored.

It is great if someone can help to create a python code to make a proper data set.
Reply
#2
Please post code you have written so we can help.
Please include all error outputs (full traceback)
Reply
#3
I'm still trying to do it using python.
Headings are:
A/C Code, Account Description, Old A/C Code, O/B Debit, O/B Credit, Current Month Debit, Current Month Credit, C/B Debit, C/B Credit

I can tabulate Last 7 variables using excel formula.
Form the right I count to number of cells contain values, if it is one took vales to last variable, if it two values taken to second from last, like did up to "old A/C code"(ie 7 from last variable)
And then copy the formula to other cells.

Like to do this using python, I have to learn more on this.
Reply
#4
Ok, looks like you really wan't to keep am Excel format. You can do this with PyExcel. See https://pypi.python.org/pypi and search for Excel.
There are quite a few packages. I have had good luck with PyExcel, some only read, others only write. PyExcel does both.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Help with writing monitored data to mysql upon change of one particular variable donottrackmymetadata 3 283 Apr-18-2024, 09:55 PM
Last Post: deanhystad
Video doing data treatment on a file import-parsing a variable EmBeck87 15 2,892 Apr-17-2023, 06:54 PM
Last Post: EmBeck87
  Need help on how to include single quotes on data of variable string hani_hms 5 2,039 Jan-10-2023, 11:26 AM
Last Post: codinglearner
  USE string data as a variable NAME rokorps 1 967 Sep-30-2022, 01:08 PM
Last Post: deanhystad
  Store variable data and display sum after 60 seconds the_dude 11 3,462 Dec-16-2021, 07:07 PM
Last Post: deanhystad
  Storing MySQL BIT Data Type data in python variable krushna 2 3,500 Dec-31-2018, 01:28 AM
Last Post: krushna
  Python MySQL - How to pick column row data as variable? bharaths 1 4,252 Nov-02-2018, 12:08 PM
Last Post: bharaths
  Retrieve data from Terminal output or from an ASE variable. DreamingInsanity 0 2,218 Jul-08-2018, 05:51 PM
Last Post: DreamingInsanity

Forum Jump:

User Panel Messages

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