3c8314eafc16c5c363c75a57320843036f459196,bokeh/models/sources.py,ColumnDataSource,_data_from_df,#Any#,141

Before Change



        new_data = {}
        for k, v in tmp_data.items():
            if isinstance(k, tuple):
                k = "_".join(k)
            new_data[k] = v

        index_name = ColumnDataSource._df_index_name(df)
        new_data[index_name] = _df.index.values

After Change


        if index_name == "index":
            _df.index = pd.Index(_df.index.values)
        else:
            _df.index = pd.Index(_df.index.values, name=index_name)
        _df.reset_index(inplace=True)

        tmp_data = {c: v.values for c, v in _df.iteritems()}
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: bokeh/bokeh
Commit Name: 3c8314eafc16c5c363c75a57320843036f459196
Time: 2018-07-31
Author: karelvandeplassche@gmail.com
File Name: bokeh/models/sources.py
Class Name: ColumnDataSource
Method Name: _data_from_df


Project Name: ixaxaar/pytorch-dnc
Commit Name: d7f916627aca77365beadc2c7c1af6504f445249
Time: 2017-11-30
Author: root@ixaxaar.in
File Name: dnc/sparse_memory.py
Class Name: SparseMemory
Method Name: rebuild_indexes


Project Name: pandas-dev/pandas
Commit Name: bb929a637ca9d4f24ea78ee4cca9ee17b65a5c1e
Time: 2020-11-17
Author: jbrockmendel@gmail.com
File Name: pandas/core/indexes/category.py
Class Name: CategoricalIndex
Method Name: astype