f70e71d5c7fdc8e25391e54e74c3402fb323ad5c,examples/plot_employee_salaries.py,,,#,45

Before Change


// we then get the data, and define a target column we will try to predict,
// as well as a dirty colum we will encode with the different methods.
// the rest will have a standard encoding
data_path = fetching.get_data_dir()
fetching.fetch_employee_salaries()
data_file = os.path.join(data_path, "employee_salaries", "rows.csv")
df = pd.read_csv(data_file).astype(str)
df["Current Annual Salary"] = [float(s[1:]) for s
                               in df["Current Annual Salary"]]
df["Year First Hired"] = [int(s.split("/")[-1])
                          for s in df["Date First Hired"]]

target_column = "Current Annual Salary"
y = df[target_column].values.ravel()

After Change


from dirty_cat.datasets import fetch_employee_salaries

description = fetch_employee_salaries()
df = pd.read_csv(description["path"]).astype(str)

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// and carry out some basic preprocessing:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: dirty-cat/dirty_cat
Commit Name: f70e71d5c7fdc8e25391e54e74c3402fb323ad5c
Time: 2018-06-06
Author: pierreglaser@msn.com
File Name: examples/plot_employee_salaries.py
Class Name:
Method Name:


Project Name: xinntao/BasicSR
Commit Name: a7aeba7f31319620937936976edf1a8bf9e11ff2
Time: 2019-01-07
Author: xintao.alpha@gmail.com
File Name: codes/models/base_model.py
Class Name: BaseModel
Method Name: __init__


Project Name: developmentseed/label-maker
Commit Name: f4d4d575203f952dd003a6b2398cd01e02669fc1
Time: 2018-02-25
Author: drew@developmentseed.org
File Name: label_maker/images.py
Class Name:
Method Name: download_images