text_plain_output_1.png image_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

path = '../input/learnplatform-covid19-impact-on-digital-learning/engagement_data'
files = glob.glob(path + '/*.csv')
all_files = []
for filename in files:
    df = pd.read_csv(filename, index_col=None, header=0)
    district_id = filename.split('/')[4].split('.')[0]
    df['district_id'] = district_id
    all_files.append(df)
engagement_data = pd.concat(all_files)
engagement_data = engagement_data.reset_index(drop=True)
product_info = pd.read_csv('../input/learnplatform-covid19-impact-on-digital-learning/products_info.csv')
districts_info = pd.read_csv('../input/learnplatform-covid19-impact-on-digital-learning/districts_info.csv')

product_info.shape
product_info.columns

product_info.isnull().sum()

product_info.duplicated().any()

product_info = product_info.rename(columns={'Provider/Company Name': 'provider'})
product_info = product_info.rename(columns={'Primary Essential Function': 'essential function'})

plt.figure(figsize=(8, 6))
sns.countplot(x='essential function', order=product_info['essential function'].value_counts().index[:3], data=product_info, color='blue')
plt.title("product's essential function")