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

Before Change


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



////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// and carry out some basic preprocessing:
df["Current Annual Salary"] = df["Current Annual Salary"].str.strip("$").astype(
    float)
df["Date First Hired"] = pd.to_datetime(df["Date First Hired"])
df["Year First Hired"] = df["Date First Hired"].apply(lambda x: x.year)

target_column = "Current Annual Salary"
y = df[target_column].values.ravel()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

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: scikit-learn-contrib/categorical-encoding
Commit Name: b5034279b48ae96ffdd4714f96e0f62b0f4807fc
Time: 2018-10-26
Author: jcastaldo08@gmail.com
File Name: category_encoders/ordinal.py
Class Name: OrdinalEncoder
Method Name: ordinal_encoding


Project Name: librosa/librosa
Commit Name: d907c99207adc05ace52025c1eb231f014d0eecb
Time: 2013-02-11
Author: brm2132@columbia.edu
File Name: librosa/__init__.py
Class Name:
Method Name: load