Skip to content

Tag: pandas

OCR: Saving Words in a CSV-file

this is a part of my OCR code. This part looks for a special word in a scanned PDF and prints this out. I have like 10 Queries like this and all print me the word I am looking for. Now I want to get the found words saved in a CSV, but I don’t know how to do that.

how to ignore null values in DataFrame when comparing columns

I am new to Pandas and learning. I am reading excel to DataFrame and comparing columns and highlight the column that’s not same. For example if Column A is not same as Column B then highlight the Column B. However I have some null values in Column A and Column B. When I execute the code, I don’t want to

df.explode() function not working in python

I am facing a weird issue, I have a column name ‘window’ in a data frame and it has a list of values i.e., [3,9,45,78]. I am trying to explode this column using df.explode(‘window’) but this is doing no job. datatype of ‘window’ column is object. I have checked my pandas version it is – 1.3.4 dataframe example Answer Remember

Python – Write a row into an array into a text file

I have to work on a flat file (size > 500 Mo) and I need to create to split file on one criterion. My original file as this structure (simplified): JournalCode|JournalLib|EcritureNum|EcritureDate|CompteNum| I need to create to file depending on the first digit from ‘CompteNum’. I have started my code as well It seems ok, my concern is to create my