<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 <h1>Table of Contents<span class="tocSkip"></span></h1>
<div class="toc"><ul class="toc-item"><li><span><a href="#Encoding-user_names-and-storing-encoder" data-toc-modified-id="Encoding-user_names-and-storing-encoder-1"><span class="toc-item-num">1&nbsp;&nbsp;</span>Encoding user_names and storing encoder</a></span></li><li><span><a href="#Reversing-name-encoding" data-toc-modified-id="Reversing-name-encoding-2"><span class="toc-item-num">2&nbsp;&nbsp;</span>Reversing name encoding</a></span><ul class="toc-item"><li><span><a href="#Find-a-certain-user" data-toc-modified-id="Find-a-certain-user-2.1"><span class="toc-item-num">2.1&nbsp;&nbsp;</span>Find a certain user</a></span></li></ul></li></ul></div>
Encoding user_names and storing encoder
Step1:  Reversing name encoding
Step2:  Find a certain user
<ASSISTANT_TASK:>
Python Code:
from planet4 import io
db = io.DBManager()
data = db.get_all()
from sklearn import preprocessing
le = preprocessing.LabelEncoder()
le.fit(data.user_name)
len(le.classes_)
data.user_name = le.transform(data.user_name)
le.transform(data.tail().user_name)
import pickle
folder = Path('/Users/klay6683/Dropbox/data/planet4/P4_catalog_v1.0')
fname = folder / 'P4_catalog_v1.0_username_encoder.pkl'
with open(fname, 'wb') as f:
    pickle.dump(le, f)
from planet4 import reduction
# storing new database
fname = folder / 'P4_catalog_v1.0_raw_classifications.hdf'
data.to_hdf(fname, 'df', format='t', data_columns=reduction.data_columns)
Explanation: <h1>Table of Contents<span class="tocSkip"></span></h1>
<div class="toc"><ul class="toc-item"><li><span><a href="#Encoding-user_names-and-storing-encoder" data-toc-modified-id="Encoding-user_names-and-storing-encoder-1"><span class="toc-item-num">1&nbsp;&nbsp;</span>Encoding user_names and storing encoder</a></span></li><li><span><a href="#Reversing-name-encoding" data-toc-modified-id="Reversing-name-encoding-2"><span class="toc-item-num">2&nbsp;&nbsp;</span>Reversing name encoding</a></span><ul class="toc-item"><li><span><a href="#Find-a-certain-user" data-toc-modified-id="Find-a-certain-user-2.1"><span class="toc-item-num">2.1&nbsp;&nbsp;</span>Find a certain user</a></span></li></ul></li></ul></div>
Encoding user_names and storing encoder
End of explanation
with open('name_encoder.pkl', 'rb') as f:
    le = pickle.load(f)
le = pickle.load
le.inverse_transform(np.array([15, 15, 49, 16, 53]))
Explanation: Reversing name encoding
End of explanation
np.argwhere(le.classes_=='Vincep1')
Explanation: Find a certain user
End of explanation
<END_TASK>