a498f3fe9373f1837ba9e003166056181448b1f7,upsetplot/plotting.py,,_process_data,#Any#Any#Any#,12
Before Change
totals = []
for i in range(data.index.nlevels):
idxslice = pd.IndexSlice[(slice(None),) * i + (True,)]
// FIXME: can get IndexingError if level only contains False
totals.append(data.loc[idxslice].sum())
totals = pd.Series(totals, index=data.index.names)
if sort_sets_by == "cardinality":
After Change
if data.ndim != 1:
raise ValueError("data must be a pandas.Series")
totals = [data[data.index.get_level_values(name)].sum()
for name in data.index.names]
totals = pd.Series(totals, index=data.index.names)
if sort_sets_by == "cardinality":
totals.sort_values(ascending=False, inplace=True)
elif sort_sets_by is not None:
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
Instances Project Name: jnothman/UpSetPlot
Commit Name: a498f3fe9373f1837ba9e003166056181448b1f7
Time: 2019-02-24
Author: joel.nothman@gmail.com
File Name: upsetplot/plotting.py
Class Name:
Method Name: _process_data
Project Name: ericmjl/pyjanitor
Commit Name: 1b54718668c7c52705de21e9ca1778485a9fc201
Time: 2021-04-06
Author: samueloranyeli@gmail.com
File Name: janitor/utils.py
Class Name:
Method Name: _sub_complete_column
Project Name: bokeh/bokeh
Commit Name: 061d916ba77932d50e41c83f476d8c0d55674856
Time: 2018-10-13
Author: xavart2011@gmail.com
File Name: examples/app/gapminder/main.py
Class Name:
Method Name:
Project Name: J535D165/recordlinkage
Commit Name: 5e82953e37f859b023eb2050abdfedc8c7447fb0
Time: 2016-02-06
Author: jonathandebruinhome@gmail.com
File Name: recordlinkage/indexing.py
Class Name: Pairs
Method Name: iterindex