<jupyter_start><jupyter_text>Unit Testing with PyTest<jupyter_code>import pandas as pd
from Transportation_packages.data import get_fremont_data

def test_fremont_data():
    data=get_fremont_data()
    assert all(data.columns ==['Total', 'East', 'West'])
    assert(isinstance(data.index,pd.DatetimeIndex))
test_fremont_data()
# data=pd.read_csv("Fremont.csv",header=0,index_col="Date",parse_dates=True)
data=pd.read_csv("Fremont.csv",header=0,index_col="Date")
data.head()
type(data.index)
data.index.dtype
pd.to_datetime(data.index)
try:
    data.index=pd.to_datetime(data.index,format="%m/%d/%Y %H:%M:%S %p")
except TypeError:
    data.index=pd.to_datetime(data.index)
data.index
data.columns=["Total","East","West"]<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16533333333333333, 'fraction_numerical': 0.0026666666666666666, 'mean_word_length': 8.158536585365853, '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': '240817', 'license': 'MIT', 'n_tokens_mistral': 291, 'n_tokens_neox': 286, 'n_words': 36, 'path': 'Unit_Testing.ipynb', 'repo_name': 'gmshashank/Transportation', 'size': '750'}