Aug-25-2023, 03:42 AM
Greetings!
This is my first try using Pandas.
The sniped below works file if the files(.XLSX) do not have blank lines in the beginning.
I thought by using 'dropna' I'll fix the problem but it does not:
This is my first try using Pandas.
The sniped below works file if the files(.XLSX) do not have blank lines in the beginning.
I thought by using 'dropna' I'll fix the problem but it does not:
exlf = exlf.dropna(axis = 0, how = 'all')Snipped:
import pandas as pd exlf = pd.read_excel('C:/01/XLS_Files/SHORT_2.xlsx') exlf = exlf.dropna(axis = 0, how = 'all') #print(f" Blank Row Removed.. {exlf}") four_col = exlf.iloc[: , [0,4,9,17]].copy() # <--- Filtering 4 Columns #print('\n. Only 4(Four) Columns \n :',four_col) filtered_l = four_col[(four_col['VR Site'] =='ORVCC') & (four_col['VR Duration(Days)'] >=449)] print(filtered_l)Any help is appreciated.