How do I execute a script that
- opens an Excel file
- searches for a value (there are many in the file so I would like to make a random copy)
- copies it to pdf / doc and saves
- goes to the next Excel file and repeats the same operation (all data from Excel must be saved in one pdf / doc.
My Excel file structure:
I want to export the data to pdf / doc for which the value is 1.
I started writing the code
import pandas as pd
import numpy as np
file_loc = "location of xlsx file"
df = pd.read_excel(file_loc, na_values=['NA'], usecols = "A:AA")
print(df)