<jupyter_start><jupyter_text><jupyter_code>import pandas as pd
import os
from google.colab import files<jupyter_output><empty_output><jupyter_text>***Navigating to the source files directory and loading data into dataframes*** *This is my GDrive directory, edit this to your necessisity*<jupyter_code>#connecting to Google Drive
from google.colab import drive
drive.mount('/content/drive')
%cd drive/My\ Drive/
!ls
%cd DB_Project/
!ls
#Loading .CSV files into pandas dataframes
covid_health_weather = pd.read_csv('US_counties_COVID19_health_weather_data.csv')
county_geo = pd.read_csv('us_county_geometry.csv')
county_sociohealth = pd.read_csv('us_county_sociohealth_data.csv')
#checking the size of dataframes to avoid any data loss
print('COVID_Health Weather: ', covid_health_weather.shape)
print('us_county_geometry: ',county_geo.shape)
print('us_county_sociohealth_data: ',county_sociohealth.shape)<jupyter_output>COVID_Health Weather:  (186740, 227)
us_county_geometry:  (3142, 7)
us_county_sociohealth_data:  (3144, 181)<jupyter_text>**Splitting and assigning all the columns in 3 files to form tables that are in 3NF** ***Making list of columns for each table***<jupyter_code># columns for "covid_stats" table
columns_covid_stats = ['fips','date','cases','deaths']

#state wide lockdown columns for "state_lockdown_details" table
columns_state_lockdown_details = ['state','date_stay_at_home_announced','date_stay_at_home_effective']

#columns for "county_details" table
columns_county_details = ['fips','county','state','total_population','lat','lon','area_sqmi']

#columns for "station_details" table
columns_station_details = ['station_id','ELEV_M','station_name','CALL']

#columns for "daily_weather_details" table
columns_daily_weather_details = ['date','fips','mean_temp','min_temp','max_temp','dewpoint','sea_level_pressure','station_pressure','visibility',
                                 'wind_speed','max_wind_speed','wind_gust','precipitation','precip_flag','fog','rain','snow','hail','thunder','tornado']

#columns for "county_socio_health" table
columns_county_socio_health = ['num_deaths','years_of_potential_life_lost_rate','percent_fair_or_poor_health','average_number_of_physically_unhealthy_days',
                                'average_number_of_mentally_unhealthy_days','percent_low_birthweight','percent_smokers','percent_adults_with_obesity','food_environment_index',
                                'percent_physically_inactive','percent_with_access_to_exercise_opportunities','percent_excessive_drinking','num_alcohol_impaired_driving_deaths','num_driving_deaths',
                                'percent_driving_deaths_with_alcohol_involvement','num_chlamydia_cases','chlamydia_rate','teen_birth_rate','num_uninsured','percent_uninsured','num_primary_care_physicians',
                                'primary_care_physicians_rate','num_dentists','dentist_rate','num_mental_health_providers','mental_health_provider_rate','preventable_hospitalization_rate',
                                'percent_with_annual_mammogram','percent_vaccinated','high_school_graduation_rate','num_some_college','population','percent_some_college','num_unemployed_CHR',
                                'labor_force','percent_unemployed_CHR','percent_children_in_poverty','eightieth_percentile_income','twentieth_percentile_income','income_ratio',
                                'num_single_parent_households_CHR','num_households_CHR','percent_single_parent_households_CHR','num_associations','social_association_rate','annual_average_violent_crimes',
                                'violent_crime_rate','num_injury_deaths','injury_death_rate','average_daily_pm2_5','presence_of_water_violation','percent_severe_housing_problems','severe_housing_cost_burden',
                                'overcrowding','inadequate_facilities','percent_drive_alone_to_work','num_workers_who_drive_alone','percent_long_commute_drives_alone','life_expectancy','num_deaths_2',
                                'age_adjusted_death_rate','num_deaths_3','child_mortality_rate','num_deaths_4','infant_mortality_rate','percent_frequent_physical_distress','percent_frequent_mental_distress',
                                'percent_adults_with_diabetes','num_hiv_cases','hiv_prevalence_rate','num_food_insecure','percent_food_insecure','num_limited_access','percent_limited_access_to_healthy_foods',
                                'num_drug_overdose_deaths','drug_overdose_mortality_rate','num_motor_vehicle_deaths','motor_vehicle_mortality_rate','percent_insufficient_sleep','num_uninsured_2',
                                'percent_uninsured_2','num_uninsured_3','percent_uninsured_3','other_primary_care_provider_rate','percent_disconnected_youth','average_grade_performance','average_grade_performance_2',
                                'median_household_income','percent_enrolled_in_free_or_reduced_lunch','segregation_index','segregation_index_2','homicide_rate','num_deaths_5','suicide_rate_age_adjusted',
                                'num_firearm_fatalities','firearm_fatalities_rate','juvenile_arrest_rate','average_traffic_volume_per_meter_of_major_roadways','num_homeowners','percent_homeowners',
                                'num_households_with_severe_cost_burden','percent_severe_housing_cost_burden','population_2','percent_less_than_18_years_of_age','percent_65_and_over',
                                'num_black','percent_black','num_american_indian_alaska_native','percent_american_indian_alaska_native','num_asian','percent_asian','num_native_hawaiian_other_pacific_islander',
                                'percent_native_hawaiian_other_pacific_islander','num_hispanic','percent_hispanic','num_non_hispanic_white','percent_non_hispanic_white','num_not_proficient_in_english',
                                'percent_not_proficient_in_english','percent_female','num_rural','percent_rural','num_housing_units','num_households_CDC','num_below_poverty','num_unemployed_CDC',
                                'per_capita_income','num_no_highschool_diploma','num_age_65_and_older','num_age_17_and_younger','num_disabled','num_single_parent_households_CDC','num_minorities',
                                'num_limited_english_abilities','num_multi_unit_housing','num_mobile_homes','num_overcrowding','num_households_with_no_vehicle','percent_below_poverty',
                                'percent_unemployed_CDC','percent_no_highschool_diploma','percent_age_65_and_older','percent_age_17_and_younger','percent_single_parent_households_CDC','percent_minorities',
                                'percent_limited_english_abilities','percent_multi_unit_housing','percent_mobile_homes','percent_overcrowding','percent_no_vehicle','percent_institutionalized_in_group_quarters',
                                'percentile_rank_below_poverty','percentile_rank_unemployed','percentile_rank_per_capita_income','percentile_rank_no_highschool_diploma','percentile_rank_socioeconomic_theme',
                                'percentile_rank_age_65_and_older','percentile_rank_age_17_and_younger','percentile_rank_disabled','percentile_rank_single_parent_households','percentile_rank_household_comp_disability_theme',
                                'percentile_rank_minorities','percentile_rank_limited_english_abilities','percentile_rank_minority_status_and_language_theme','percentile_rank_multi_unit_housing',
                                'percentile_rank_mobile_homes','percentile_rank_overcrowding','percentile_rank_no_vehicle','percentile_rank_institutionalized_in_group_quarters',
                                'percentile_rank_housing_and_transportation','percentile_rank_social_vulnerability','km_to_closest_station','fips','station_id']<jupyter_output><empty_output><jupyter_text>**Creating a DataFrame for each table**<jupyter_code>#creating dataframe for "covid_stats" table 
covid_stats = covid_health_weather[columns_covid_stats].sort_values(['fips','date'])
print("Shape of covid_stats:",covid_stats.shape)

#creating dataframe for "state_lockdown_details" table 
state_lockdown_details = covid_health_weather[columns_state_lockdown_details].drop_duplicates()
print("Shape of state_lockdown_details:",state_lockdown_details.shape)

#creating dataframe for "county_details" table 
county_details_socio = county_sociohealth[columns_county_details].drop_duplicates()
county_details_covid_health = covid_health_weather[columns_county_details].drop_duplicates()
frames = [county_details_socio, county_details_covid_health]
county_details = pd.concat(frames)
county_details = county_details.drop_duplicates('fips')
print("Shape of county_details:",county_details.shape)

#creating dataframe for "station_details" table
station_details = covid_health_weather[columns_station_details].drop_duplicates('station_id')
print("Shape of station_details:",station_details.shape)

#creating dataframe for "daily_weather_details" table
daily_weather_details = covid_health_weather[columns_daily_weather_details].drop_duplicates()
print("Shape of daily_weather_details",daily_weather_details.shape)

#creating dataframe for "county_socio_health" table
county_socio_health = covid_health_weather[columns_county_socio_health].drop_duplicates()
print("Shape of county_socio_health:",county_socio_health.shape)
county_socio_health = county_socio_health.sort_values('station_id',ascending=False)
county_socio_health = county_socio_health.drop_duplicates('fips')
print("Shape of county_socio_health:",county_socio_health.shape)<jupyter_output>Shape of covid_stats: (186740, 4)
Shape of state_lockdown_details: (51, 3)
Shape of county_details: (3443, 7)
Shape of station_details: (1668, 4)
Shape of daily_weather_details (186740, 20)
Shape of county_socio_health: (3424, 174)
Shape of county_socio_health: (2960, 174)<jupyter_text>***Finding duplicates based on the primary key columns choosen***<jupyter_code>#for "covid_stats" table 
print("covid_stats: ",covid_stats[covid_stats.duplicated(['fips','date'])].shape)

#for "state_lockdown_details" table 
print("state_lockdown_details: ",state_lockdown_details[state_lockdown_details.duplicated(['state'])].shape)

#for "county_details" table 
print("county_details: ",county_details[county_details.duplicated(['fips'])].shape)

#for "daily_weather_details" table
print("daily_weather_details: ",daily_weather_details[daily_weather_details.duplicated(['fips','date'])].shape)

#for "county_socio_health" table
print("county_socio_health: ",county_socio_health[county_socio_health.duplicated(['fips'])].shape)

#for "station_details" table
print("station_details: ",station_details[station_details.duplicated(['station_id','ELEV_M'])])<jupyter_output>covid_stats:  (0, 4)
state_lockdown_details:  (0, 3)
county_details:  (0, 7)
daily_weather_details:  (0, 20)
county_socio_health:  (0, 174)
station_details:  Empty DataFrame
Columns: [station_id, ELEV_M, station_name, CALL]
Index: []<jupyter_text>***Generating csv files***<jupyter_code>covid_stats.to_csv('covid_stats.csv', index=False)
state_lockdown_details.to_csv('state_lockdown_details.csv', index=False)
county_details.to_csv('county_details.csv', index=False)
daily_weather_details.to_csv('daily_weather_details.csv', index=False)
county_socio_health.to_csv('county_socio_health.csv', index=False)
station_details.to_csv('station_details.csv', index=False)<jupyter_output><empty_output><jupyter_text>***Station Details table***<jupyter_code>from google.colab import files

with open('station_details.sql', 'w') as f:
  for index, row in station_details.iterrows():
      f.write("INSERT INTO STATION_DETAILS (station_id, station_name, ELEV_M, call_values) VALUES (" + str(row['station_id']) + ",\'" + str(row['station_name']) + "\'," + str(row['ELEV_M']) + ",\'" + str(row['CALL']) + "\');")
      f.write("\n")
files.download('station_details.sql')<jupyter_output><empty_output><jupyter_text>***COVID stats table***<jupyter_code># Foramtting the dates
covid_stats['date'] = pd.to_datetime(covid_stats['date'])
with open('FIPS_DAILY_CASES.sql', 'w') as f:
  for index, row in covid_stats.iterrows():
      f.write("INSERT INTO FIPS_DAILY_CASES (FIPS, DATE_RECORDED, CASES, DEATHS) VALUES (\'" + str(row['fips']) + "\',\'" + str(row['date']) + "\'," + str(row['cases']) + "," + str(row['deaths']) + ");")
      f.write("\n")
files.download('FIPS_DAILY_CASES.sql')<jupyter_output><empty_output><jupyter_text>***state_lockdown_details table***<jupyter_code>state_lockdown_details['date_stay_at_home_announced'] = pd.to_datetime(state_lockdown_details['date_stay_at_home_announced'])
state_lockdown_details['date_stay_at_home_effective'] = pd.to_datetime(state_lockdown_details['date_stay_at_home_effective'])
with open('state_lockdown_details.sql', 'w') as f:
  for index, row in state_lockdown_details.iterrows():
      f.write("INSERT INTO state_lockdown_details (state, date_stay_at_home_announced, date_stay_at_home_effective) VALUES (\'" + str(row['state']) + "\',\'" + str(row['date_stay_at_home_announced']) + "\',\'" + str(row['date_stay_at_home_effective']) + "\');")
      f.write("\n")
files.download('state_lockdown_details.sql')<jupyter_output><empty_output><jupyter_text>***County Details Table***<jupyter_code>with open('county_details.sql', 'w') as f:
  for index, row in county_details.iterrows():
      f.write("INSERT INTO county_details (fips, county, state, total_population, lat, lon, area_sqmi ) VALUES ("
      + "\'" + str(row['fips']) + "\'" + ","
      + "\'" + str(row['county']) + "\'"  + ","
      + "\'" + str(row['state']) + "\'" + ","
      + str(row['total_population']) + ","
      + str(row['lat']) + ","
      + str(row['lon']) + ","
      + str(row['area_sqmi'])
      + ");")
      f.write("\n")
files.download('county_details.sql')<jupyter_output><empty_output><jupyter_text>***Daily Weather Details table***<jupyter_code>daily_weather_details['date'] = pd.to_datetime(daily_weather_details['date'])
daily_weather_details = daily_weather_details.sort_values(['fips','date'])
with open('daily_weather_details.sql', 'w') as f:
  for index, row in daily_weather_details.iterrows():
      f.write("INSERT INTO daily_weather_details (fips, date_recorded, mean_temp, min_temp, max_temp, dewpoint, sea_level_pressure, station_pressure , visibility, wind_speed, max_wind_speed, wind_gust, precipitation, precip_flag, fog, rain, snow, hail, thunder, tornado) VALUES ("
      + "\'" + str(row['fips']) + "\'" + ","
      + "\'" + str(row['date']) + "\'" + ","
      + str(row['mean_temp']) + ","
      + str(row['min_temp']) + ","
      + str(row['max_temp']) + ","
      + str(row['dewpoint']) + ","
      + str(row['sea_level_pressure']) + ","
      + str(row['station_pressure']) + ","
      + str(row['visibility']) + ","
      + str(row['wind_speed']) + ","
      + str(row['max_wind_speed']) + ","
      + str(row['wind_gust']) + ","
      + str(row['precipitation']) + ","
      + "\'" + str(row['precip_flag']) + "\'" + ","
      + str(row['fog']) + ","
      + str(row['rain']) + ","
      + str(row['snow']) + ","
      + str(row['hail']) + ","
      + str(row['thunder']) + ","
      + str(row['tornado'])
      + ");")
      f.write("\n")
files.download('daily_weather_details.sql')<jupyter_output><empty_output><jupyter_text>***Socio Health Data***<jupyter_code>prefix = "INSERT INTO county_socio_health ("
for element in columns_county_socio_health:
  prefix = prefix + element
  prefix = prefix + ','
prefix = prefix[:len(prefix)-1]
prefix += ") VALUES ("
print(prefix)
with open('county_socio_health.sql', 'w') as f:
  for index, row in county_socio_health.iterrows():
      f.write( prefix
      + str(row['num_deaths']) + ","
      + str(row['years_of_potential_life_lost_rate']) + ","
      + str(row['percent_fair_or_poor_health']) + ","
      + str(row['average_number_of_physically_unhealthy_days']) + ","
      + str(row['average_number_of_mentally_unhealthy_days']) + ","
      + str(row['percent_low_birthweight']) + ","
      + str(row['percent_smokers']) + ","
      + str(row['percent_adults_with_obesity']) + ","
      + str(row['food_environment_index']) + ","
      + str(row['percent_physically_inactive']) + ","
      + str(row['percent_with_access_to_exercise_opportunities']) + ","
      + str(row['percent_excessive_drinking']) + ","
      + str(row['num_alcohol_impaired_driving_deaths']) + ","
      + str(row['num_driving_deaths']) + ","
      + str(row['percent_driving_deaths_with_alcohol_involvement']) + ","
      + str(row['num_chlamydia_cases']) + ","
      + str(row['chlamydia_rate']) + ","
      + str(row['teen_birth_rate']) + ","
      + str(row['num_uninsured']) + ","
      + str(row['percent_uninsured']) + ","
      + str(row['num_primary_care_physicians']) + ","
      + str(row['primary_care_physicians_rate']) + ","
      + str(row['num_dentists']) + ","
      + str(row['dentist_rate']) + ","
      + str(row['num_mental_health_providers']) + ","
      + str(row['mental_health_provider_rate']) + ","
      + str(row['preventable_hospitalization_rate']) + ","
      + str(row['percent_with_annual_mammogram']) + ","
      + str(row['percent_vaccinated']) + ","
      + str(row['high_school_graduation_rate']) + ","
      + str(row['num_some_college']) + ","
      + str(row['population']) + ","
      + str(row['percent_some_college']) + ","
      + str(row['num_unemployed_CHR']) + ","
      + str(row['labor_force']) + ","
      + str(row['percent_unemployed_CHR']) + ","
      + str(row['percent_children_in_poverty']) + ","
      + str(row['eightieth_percentile_income']) + ","
      + str(row['twentieth_percentile_income']) + ","
      + str(row['income_ratio']) + ","
      + str(row['num_single_parent_households_CHR']) + ","
      + str(row['num_households_CHR']) + ","
      + str(row['percent_single_parent_households_CHR']) + ","
      + str(row['num_associations']) + ","
      + str(row['social_association_rate']) + ","
      + str(row['annual_average_violent_crimes']) + ","
      + str(row['violent_crime_rate']) + ","
      + str(row['num_injury_deaths']) + ","
      + str(row['injury_death_rate']) + ","
      + str(row['average_daily_pm2_5']) + ","
      + "\'" + str(row['presence_of_water_violation']) + "\'" + ","
      + str(row['percent_severe_housing_problems']) + ","
      + str(row['severe_housing_cost_burden']) + ","
      + str(row['overcrowding']) + ","
      + str(row['inadequate_facilities']) + ","
      + str(row['percent_drive_alone_to_work']) + ","
      + str(row['num_workers_who_drive_alone']) + ","
      + str(row['percent_long_commute_drives_alone']) + ","
      + str(row['life_expectancy']) + ","
      + str(row['num_deaths_2']) + ","
      + str(row['age_adjusted_death_rate']) + ","
      + str(row['num_deaths_3']) + ","
      + str(row['child_mortality_rate']) + ","
      + str(row['num_deaths_4']) + ","
      + str(row['infant_mortality_rate']) + ","
      + str(row['percent_frequent_physical_distress']) + ","
      + str(row['percent_frequent_mental_distress']) + ","
      + str(row['percent_adults_with_diabetes']) + ","
      + str(row['num_hiv_cases']) + ","
      + str(row['hiv_prevalence_rate']) + ","
      + str(row['num_food_insecure']) + ","
      + str(row['percent_food_insecure']) + ","
      + str(row['num_limited_access']) + ","
      + str(row['percent_limited_access_to_healthy_foods']) + ","
      + str(row['num_drug_overdose_deaths']) + ","
      + str(row['drug_overdose_mortality_rate']) + ","
      + str(row['num_motor_vehicle_deaths']) + ","
      + str(row['motor_vehicle_mortality_rate']) + ","
      + str(row['percent_insufficient_sleep']) + ","
      + str(row['num_uninsured_2']) + ","
      + str(row['percent_uninsured_2']) + ","
      + str(row['num_uninsured_3']) + ","
      + str(row['percent_uninsured_3']) + ","
      + str(row['other_primary_care_provider_rate']) + ","
      + str(row['percent_disconnected_youth']) + ","
      + str(row['average_grade_performance']) + ","
      + str(row['average_grade_performance_2']) + ","
      + str(row['median_household_income']) + ","
      + str(row['percent_enrolled_in_free_or_reduced_lunch']) + ","
      + str(row['segregation_index']) + ","
      + str(row['segregation_index_2']) + ","
      + str(row['homicide_rate']) + ","
      + str(row['num_deaths_5']) + ","
      + str(row['suicide_rate_age_adjusted']) + ","
      + str(row['num_firearm_fatalities']) + ","
      + str(row['firearm_fatalities_rate']) + ","
      + str(row['juvenile_arrest_rate']) + ","
      + str(row['average_traffic_volume_per_meter_of_major_roadways']) + ","
      + str(row['num_homeowners']) + ","
      + str(row['percent_homeowners']) + ","
      + str(row['num_households_with_severe_cost_burden']) + ","
      + str(row['percent_severe_housing_cost_burden']) + ","
      + str(row['population_2']) + ","
      + str(row['percent_less_than_18_years_of_age']) + ","
      + str(row['percent_65_and_over']) + ","
      + str(row['num_black']) + ","
      + str(row['percent_black']) + ","
      + str(row['num_american_indian_alaska_native']) + ","
      + str(row['percent_american_indian_alaska_native']) + ","
      + str(row['num_asian']) + ","
      + str(row['percent_asian']) + ","
      + str(row['num_native_hawaiian_other_pacific_islander']) + ","
      + str(row['percent_native_hawaiian_other_pacific_islander']) + ","
      + str(row['num_hispanic']) + ","
      + str(row['percent_hispanic']) + ","
      + str(row['num_non_hispanic_white']) + ","
      + str(row['percent_non_hispanic_white']) + ","
      + str(row['num_not_proficient_in_english']) + ","
      + str(row['percent_not_proficient_in_english']) + ","
      + str(row['percent_female']) + ","
      + str(row['num_rural']) + ","
      + str(row['percent_rural']) + ","
      + str(row['num_housing_units']) + ","
      + str(row['num_households_CDC']) + ","
      + str(row['num_below_poverty']) + ","
      + str(row['num_unemployed_CDC']) + ","
      + str(row['per_capita_income']) + ","
      + str(row['num_no_highschool_diploma']) + ","
      + str(row['num_age_65_and_older']) + ","
      + str(row['num_age_17_and_younger']) + ","
      + str(row['num_disabled']) + ","
      + str(row['num_single_parent_households_CDC']) + ","
      + str(row['num_minorities']) + ","
      + str(row['num_limited_english_abilities']) + ","
      + str(row['num_multi_unit_housing']) + ","
      + str(row['num_mobile_homes']) + ","
      + str(row['num_overcrowding']) + ","
      + str(row['num_households_with_no_vehicle']) + ","
      + str(row['percent_below_poverty']) + ","
      + str(row['percent_unemployed_CDC']) + ","
      + str(row['percent_no_highschool_diploma']) + ","
      + str(row['percent_age_65_and_older']) + ","
      + str(row['percent_age_17_and_younger']) + ","
      + str(row['percent_single_parent_households_CDC']) + ","
      + str(row['percent_minorities']) + ","
      + str(row['percent_limited_english_abilities']) + ","
      + str(row['percent_multi_unit_housing']) + ","
      + str(row['percent_mobile_homes']) + ","
      + str(row['percent_overcrowding']) + ","
      + str(row['percent_no_vehicle']) + ","
      + str(row['percent_institutionalized_in_group_quarters']) + ","
      + str(row['percentile_rank_below_poverty']) + ","
      + str(row['percentile_rank_unemployed']) + ","
      + str(row['percentile_rank_per_capita_income']) + ","
      + str(row['percentile_rank_no_highschool_diploma']) + ","
      + str(row['percentile_rank_socioeconomic_theme']) + ","
      + str(row['percentile_rank_age_65_and_older']) + ","
      + str(row['percentile_rank_age_17_and_younger']) + ","
      + str(row['percentile_rank_disabled']) + ","
      + str(row['percentile_rank_single_parent_households']) + ","
      + str(row['percentile_rank_household_comp_disability_theme']) + ","
      + str(row['percentile_rank_minorities']) + ","
      + str(row['percentile_rank_limited_english_abilities']) + ","
      + str(row['percentile_rank_minority_status_and_language_theme']) + ","
      + str(row['percentile_rank_multi_unit_housing']) + ","
      + str(row['percentile_rank_mobile_homes']) + ","
      + str(row['percentile_rank_overcrowding']) + ","
      + str(row['percentile_rank_no_vehicle']) + ","
      + str(row['percentile_rank_institutionalized_in_group_quarters']) + ","
      + str(row['percentile_rank_housing_and_transportation']) + ","
      + str(row['percentile_rank_social_vulnerability']) + ","
      + str(row['km_to_closest_station']) + ","
      + "\'" + str(row['fips']) + "\'" + ","
      + str(row['station_id']) 
      + ");")
      f.write("\n")
files.download('county_socio_health.sql')
columns_county_socio_health = pd.DataFrame(columns_county_socio_health)
columns_county_socio_health.to_csv('columns_county_socio_health.csv',index = False)
files.download('columns_county_socio_health.csv')<jupyter_output><empty_output><jupyter_text>***experiments***<jupyter_code>print(covid_health_weather['station_id'])
covid_health_weather[['station_id','fips']].loc[covid_health_weather['station_id']==70178026529.00]

station_fips = covid_health_weather[['station_id','fips']]
station_fips = station_fips.drop_duplicates().sort_values('station_id')
station_fips.loc[station_fips['station_id']=='NaN']
station_fips.iloc[186690]
station_fips.to_csv('station_fips.csv',index = False)
files.download('station_fips.csv')
set(covid_health_weather['station_id'].loc[covid_health_weather['ELEV_M']==2017.8])
covid_health_weather['ELEV_M'].sort_values()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1631510977184675, 'fraction_numerical': 0.006378898759441162, 'mean_word_length': 5.528870720490547, 'pattern_counts': {'":': 0, '<': 50, '<?xml version=': 0, '>': 50, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 9, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '13', 'dir': 'jupyter-structured-clean-dedup', 'id': '94061', 'license': 'MIT', 'n_tokens_mistral': 9004, 'n_tokens_neox': 8494, 'n_words': 764, 'path': 'sql_insert_generator.ipynb', 'repo_name': 'rajadevineni/MySQL_Mongo_DB_for_COVID_Data', 'size': '25553'}