Jun-29-2020, 07:46 PM
Hello,
I have an excel file that doesn't have header names, and the data doesn't start till row 8. I can't add data to rows 1 -7.
I want to do a partial word search on column A, and copy the whole row of data that contains that partial word to a new excel file. I tried the below code but I'm doing something wrong because it comes back with
KeyError A
I have an excel file that doesn't have header names, and the data doesn't start till row 8. I can't add data to rows 1 -7.
I want to do a partial word search on column A, and copy the whole row of data that contains that partial word to a new excel file. I tried the below code but I'm doing something wrong because it comes back with
KeyError A
import pandas as pd df = pd.read_excel('C:\\data\\Report1.xlsx', sheet_name = 'data1') df = df[df["A"].str.contains('Down*')]