<jupyter_start><jupyter_text>Importing Data<jupyter_code>import pandas as pd
import numpy as np
train= pd.read_csv('train.csv')
weather= pd.read_csv('weather.csv')
spray=pd.read_csv('spray.csv')
print('Weather')
print(weather.columns)
print('--')
print('Spray')
print(spray.columns)
print('--')
print('Train')
print(train.columns)
weather.head(3)
spray.head(1)
train.head(2)
#changing date to month, day, year 
from datetime import datetime
train['Date'] = train["Date"].apply(lambda x: \
    datetime.strptime(x,'%Y-%m-%d'))
# Check for number of rows and columns
print('Weather')
print(weather.shape)
print('-')
print('Spray')
print(spray.shape)
print('-')
print('Train')
print(train.shape)
# Check for kind of data
print('Weather Type')
print(weather.dtypes)
print('-')
print('Spray Type')
print(spray.dtypes)
print('-')
print('Train Type')
print(train.dtypes)
#checking for nulls

print('Weather Nulls')
print(weather.isnull().values.any())
print('-')
print('Spray Nulls')
print(spray.isnull().values.any())
print('-')
print('Train Nulls')
print(train.isnull().values.any())
print('Weather')
print(weather.describe())
print('-')
print('Spray')
print(spray.describe())
print('-')
print('Train')
print(train.describe())
spray.isnull().sum()
weather[['WetBulb']].head(1)
weather[['Sunset']].head(3)
sum(weather['Sunset'].str.contains('-'))
weather.head(3)
spray= pd.read_csv('spray.csv')
spray.columns
spray.duplicated().sum()
spray.shape
weather.shape
spray.describe()
weather.describe()
train.columns
#We are given where the mosquitos were trapped
train['Trap'] = train['Trap'].map(lambda x: x.lstrip('T'))
train.groupby('Trap')['NumMosquitos'].count()

# How many mosquitos were in each trap 
train.groupby('Species')['WnvPresent'].count()

#The species that mainly have the disease are
CULEX PIPIENS             2699
CULEX PIPIENS/RESTUANS    4752
CULEX RESTUANS            2740<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.18870883429168844, 'fraction_numerical': 0.009409304756926294, 'mean_word_length': 6.447470817120623, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '625865', 'license': 'MIT', 'n_tokens_mistral': 735, 'n_tokens_neox': 673, 'n_words': 144, 'path': 'assets/Project 4.ipynb', 'repo_name': 'awab-m7md/West-Nile-Virus', 'size': '1913'}