I've tried the following code.
import pandas as pd
import numpy as np
excel_file = 'bank_acc.xlsx'
bank_acc = pd.read_excel(excel_file)
bank_acc.describe()
acc_no = 1
column1 = pd.read_excel(excel_file, index_cols=None, na_values=['NA'], usecols="A:C", skiprows=0)
if acc_no in column1:
print("found")
else:
print("not found")
But it is always printing "not found"
I have the following excel file:
now if i change the value of acc_no as 1 , 2 or 3 it prints the not found. if i change the values of acc_no from as string 'acc_no' then it print found. i think it means that it only scan the first row always...not all rows.. can anyone have a suggestion or i have written a wrong code...