3ab0e54a3ce88c7018a34192461dd47e5867d357,atlas/tables.py,,col_split,#Any#Any#Any#,48
Before Change
for value in presplit.split(sep):
indexes.append(i)
new_values.append(value)
new_df = df.iloc[indexes, :].copy()
new_df[column] = new_values
return new_df
After Change
pandas.DataFrame
if not cols:
return df
col_series = []
for c in cols:
col_series.append(df[c].str.split(sep, expand=True).stack().str.strip().reset_index(level=1, drop=True))
temp_df = pd.concat(col_series, axis=1, keys=cols)
return df.drop(cols, axis=1).join(temp_df).reset_index(drop=True)
def get_split_cols(df, values):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: metagenome-atlas/atlas
Commit Name: 3ab0e54a3ce88c7018a34192461dd47e5867d357
Time: 2017-01-28
Author: joe.brown@pnnl.gov
File Name: atlas/tables.py
Class Name:
Method Name: col_split
Project Name: analysiscenter/batchflow
Commit Name: 49f4e83ae4323e032bdd232e466e59b4aeceb458
Time: 2018-03-28
Author: g.ivanov@analysiscenter.ru
File Name: dataset/batch_image.py
Class Name: ImagesBatch
Method Name: _invert_
Project Name: analysiscenter/batchflow
Commit Name: d381fb0787395076ecb8a3bd6984f52a16793fae
Time: 2018-03-27
Author: g.ivanov@analysiscenter.ru
File Name: dataset/batch_image.py
Class Name: ImagesBatch
Method Name: _invert_