Given a pdf(attached) with table row splitted across multiple pages with page break in between. I am trying to extract tabular data in a csv from this pdf using pdfplumber, but am getting this data in separate rows in a csv. Basically I would like to get this data in a single row.
With pdfplumber, is there a way to identify if the row has a horizontal border or not? If this information is available, it could help in merging the rows.
In the attached image, grey colour coded are the cells content.
Related
I am working with incomplete historical data and am using Python to select specific information from TXT files (e.g. via Regex) and write them to .csv tables.
Is it possible to write a certain item or a list of items to new rows in a particular column in an existing CSV file?
I can add individual strings or lists as consecutive new rows or columns to an existing table, but very often, I am only filling in "missing information".
It would be great to find a way to select the next row in the "n"-th column of a CSV table, or to select the column by name / column heading.
Have you considered using Pandas?
It has convenient methods for reading and writing csv-files. Working with columns, rows, and cells is quite intuitive.
It takes a little time to understand the basics of Pandas. but if you plan to work with csv and csv-like data more than once, it is worth it.
I need to transform Excel files to ESRI FileGDB using FME.
The problem is that my excel worksheets contains more than one table.
Example: At row 1, I have the attributes of the first table. Row 2 to 4 contains the values.
At row 6 I have the attributes of the second table. 45 next rows are the values.
And the same thing for the third table.
These rows can change. I could have the attributes of the second table at any row.
I think the best solution would be to have a process that split the .xls file in three different files so I can transform them directly into ESRI format.
Is there a transformer that could perform this task or should I code it myself in Python?
PS: This process will be called from a REST Service so I can't do this manually. Also, the columns name will always be the same.
Thanks
FME reads the Excel rows in order, so I would add a Counter transformer after reading the Excel file.
The column names don't change, so you could check at which row (number given by the Counter) the new table begins.
Then is just a matter of filtering the features with a TestFilter.
I have data distributed in columns. I want to arrange columns in some order based on text inside.
Original data format:
Desired data format:
Specifically, I want to sort columns by data inside alphabetically and taking into account only first row. Other rows does not matter.
There is way to sort data from left to right. See the below screenshot.
I have a report (rdlc) that has a data set that has row grouping based upon certain field values.
It is set up to appear as separate tables for each grouping.
I now have a requirement to display a column for only one of these groupings.
For example, if value = a then show a column in the grouped table.
If value <> a then do not display this column.
I have tried several visibility techniques but cannot get the column to show in only one grouping.
The closest I got was to show the column in the required grouping, but it left white space for the column within the other tables.
Has anyone successfully tried anything similar?
Thanks for any and all assistance!!!
A table in SSRS ( and many other systems) must have the same columns for every row, and the same rows for every column. You can merge some of these, but that won't accomplish what you want: changing the number of columns for only some rows of the table.
I would separate this into multiple tables. Use the filters property of the different tables(tablixes) to filter each table to only display the appropriate rows if you would like to keep your current dataset.
I have a csv file open in excel. I want to create two line graphs by choosing two rows. The problem is that these rows are in one row. How is this possible? One row contains many values from which a set of values needs to be plotted against set of values in the same row. The power of the two sets are identical. These two sets of values are fetched by filtering the row according to the values of other columns. I can create the plot of one set since I can apply the filter once. How can I add the second set of values onto the existing plot by doing an independent filter on the same column? I don't want to split the file into two different files. I am not that familiar with excel 2007.
If your data is labeled, you probably want to use a pivot chart. Click the link for an overview