<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Load, filter, export the NSQD Dataset
The cell below imports the libaries we need and defines some function that help up clean up the NSQD
Step1:  Create a raw data set, then compute season and apply basic filters
(also export to CSV file)
Step2:  Show the sample counts for each parameter
Step3:  Export TSS to a CSV file
<ASSISTANT_TASK:>
Python Code:
import numpy 
import wqio
import pynsqd
import pycvc
def get_cvc_parameter(nsqdparam):
    try:
        cvcparam = list(filter(
            lambda p: p['nsqdname'] == nsqdparam, pycvc.info.POC_dicts
        ))[0]['cvcname']
    except IndexError:
        cvcparam = numpy.nan
    return cvcparam
def fix_nsqd_bacteria_units(df, unitscol='units'):
    df[unitscol] = df[unitscol].replace(to_replace='MPN/100 mL', value='CFU/100 mL')
    return df
nsqd_params = [
    p['nsqdname'] 
    for p in pycvc.info.POC_dicts
]
Explanation: Load, filter, export the NSQD Dataset
The cell below imports the libaries we need and defines some function that help up clean up the NSQD
End of explanation
raw_data = pynsqd.NSQData().data
clean_data = (
    raw_data
        .query("primary_landuse != 'Unknown'")
        .query("parameter in @nsqd_params")
        .query("fraction == 'Total'")
        .query("epa_rain_zone == 1")
        .assign(station='outflow')
        .assign(cvcparam=lambda df: df['parameter'].apply(get_cvc_parameter))
        .assign(season=lambda df: df['start_date'].apply(wqio.utils.getSeason))
        .drop('parameter', axis=1)
        .rename(columns={'cvcparam': 'parameter'})
        .pipe(fix_nsqd_bacteria_units)
        .query("primary_landuse == 'Residential'")
)
Explanation: Create a raw data set, then compute season and apply basic filters
(also export to CSV file)
End of explanation
clean_data.groupby(by=['parameter', 'season']).size().unstack(level='season')
Explanation: Show the sample counts for each parameter
End of explanation
(
    clean_data
        .query("parameter == 'Total Suspended Solids'")
        .to_csv('NSQD_Res_TSS.csv', index=False)
)
Explanation: Export TSS to a CSV file
End of explanation
<END_TASK>