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
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)
In pattern: SUPERPATTERN
Frequency: 4
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: biotite-dev/biotite
Commit Name: 140c7a94b8fecb933f0075d32b999c550f414e38
Time: 2018-10-30
Author: patrick.kunzm@gmail.com
File Name: src/biotite/sequence/annotation.py
Class Name: Annotation
Method Name: __getitem__
Project Name: SheffieldML/GPy
Commit Name: f3b74fa85ff628de673e3a652a04d30880646487
Time: 2014-03-31
Author: ibinbei@gmail.com
File Name: GPy/models/mrd.py
Class Name: MRD
Method Name: __init__
Project Name: home-assistant/home-assistant
Commit Name: 48161697f817e2316ebaa3f7b2a7e99a270b6476
Time: 2017-02-07
Author: pascal.vizeli@syshack.ch
File Name: homeassistant/components/media_player/sonos.py
Class Name: SonosDevice
Method Name: source_list