Question: Apply Pandas and use the below-given codes. From the DataFrame, A01 to A10 are customers with their consumptions. (Q1) Identify the customers with consumption exceeding

Apply Pandas and use the below-given codes. From the DataFrame, A01 to A10 are customers with their consumptions. (Q1) Identify the customers with consumption exceeding 1900 for more than 75 days. (Q2) Compute the number of days that they exceeded daily usage of 1900. (Q3) For every month, the customers who consume the least are efficient. Which customers are efficient for the most number of months?

import numpy as np import pandas as pd np.random.seed(2)

dates = pd.date_range("2020-1-1","2021-12-31") accounts = [f"A{i+1:02}" for i in range(10)] days, num_acc = len(dates), len(accounts) kWhs = np.random.randint(1000,2000,[days, num_acc]) df = pd.DataFrame(kWhs, index=dates, columns=accounts) df.head()

print(df[df>1900])

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!