<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Cleaning Astronomical Datasets
I have posed two problems for you to work on in this hands-on exercise.  
Concept drift
Step1:  0b. Data Location
We will use the same data from the Day 2 clustering exercise (see that notebook to download the data).
Please specify paths for the following
Step2:  0c. Load Data
<ASSISTANT_TASK:>
Python Code:
import numpy as np
import pandas as pd
%matplotlib inline
import matplotlib.pyplot as plt
# You can add anything you need as you work
Explanation: Cleaning Astronomical Datasets
I have posed two problems for you to work on in this hands-on exercise.  
Concept drift: Do the training and test set distributions differ?
Find mislabeled examples in the labeled ZTF data provided
More information for each is provided below.  You may want or need to cut and paste code from your other notebooks.  But first...
0a. Imports
These are all the imports that will be used in this notebook.  All should be available in the DSFP conda environment.
End of explanation
F_META = '../Day2/dsfp_ztf_meta.npy'
F_FEATS = '../Day2/dsfp_ztf_feats.npy'
D_STAMPS = '../Day2/dsfp_ztf_png_stamps'
Explanation: 0b. Data Location
We will use the same data from the Day 2 clustering exercise (see that notebook to download the data).
Please specify paths for the following:
End of explanation
meta_np = np.load(F_META)
feats_np = np.load(F_FEATS)
COL_NAMES = ['diffmaglim', 'magpsf', 'sigmapsf', 'chipsf', 'magap', 'sigmagap',
             'distnr', 'magnr', 'sigmagnr', 'chinr', 'sharpnr', 'sky',
             'magdiff', 'fwhm', 'classtar', 'mindtoedge', 'magfromlim', 'seeratio',
             'aimage', 'bimage', 'aimagerat', 'bimagerat', 'elong', 'nneg',
             'nbad', 'ssdistnr', 'ssmagnr', 'sumrat', 'magapbig', 'sigmagapbig',
             'ndethist', 'ncovhist', 'jdstarthist', 'jdendhist', 'scorr', 'label']
# NOTE FROM Umaa: I've decided to eliminate the following features. Dropping them.
#
COL_TO_DROP = ['ndethist', 'ncovhist', 'jdstarthist', 'jdendhist', 
               'distnr', 'magnr', 'sigmagnr', 'chinr', 'sharpnr', 
               'classtar', 'ssdistnr', 'ssmagnr', 'aimagerat', 'bimagerat', 
               'magapbig', 'sigmagapbig', 'scorr']
feats_df = pd.DataFrame(data=feats_np, index=meta_np['candid'], columns=COL_NAMES)
print("There are {} columns left.".format(len(feats_df.columns)))
print("They are: {}".format(list(feats_df.columns)))
feats_df.drop(columns=COL_TO_DROP, inplace=True) 
#feats_df.describe()
Explanation: 0c. Load Data
End of explanation
<END_TASK>