Issue
For example, I want to count the filled cells in the range C5 to C25 or D8 to D17. I can't use header names.
How can I do that?
dataxls = pd.read_excel('Racklist.xlsx', header=None)
Solution
You can try:
dataxls = pd.read_excel("YOUR_FILE_NAME.xlsx", 'Sheet1', usecols = "C", header = 4, nrows=25)
num_filled_cells = dataxls.shape[0] - dataxls.isnull().sum().values[0]
print(num_filled_cells)
Answered By - Phoenix
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.