Format: text/x-python
⬇ Download File (401 B)
   1  # -*- coding: utf-8 -*-
   2  """
   3  Created on Sat May 22 17:34:30 2021
   4  
   5  @author: PC
   6  """
   7  
   8  import pandas as pd 
   9  import os 
  10  
  11  os.chdir(r'C:\Users\PC\Pytho')
  12  
  13  def average_influenza_doses():
  14  
  15      df= pd.read_csv('NISPUF17.csv')
  16      df=df[['CBF_01', 'P_NUMFLU']]
  17      df.dropna(inplace= True)
  18      tup = (df[df['CBF_01']==1]['P_NUMFLU'].mean(), df[df['CBF_01']==2]['P_NUMFLU'].mean())
  19      return tup