289da8733f1d0faa48c30867093f944da839e341,lib/streamlit/hello.py,,data_frame_demo,#,159

Before Change


    "////// Gross Agricultural Production \[$1B\]"
    st.write(df.loc[countries].sort_index())

    ax = df.loc[countries].T.plot(kind="area", figsize=(20, 8), stacked=False)
    ax.set_ylabel("GAP in Billions (Int $)", fontsize=25)
    ax.set_xlabel("Year", fontsize=25)
    ax.tick_params(labelsize=20)
    ax.legend(loc=2, prop={"size": 20})

After Change



    data = data.T.reset_index()
    data = pd.melt(data, id_vars=["index"]).rename(
        columns={"index": "year", "value": "Gross Agricultural Product ($B)"}
    )
    chart = (
        alt.Chart(data)
        .mark_area(opacity=0.3)
        .encode(
            x="year:T",
            y=alt.Y("Gross Agricultural Product ($B):Q", stack=None),
            color="Region:N",
        )
    )
    st.write("", "", chart)


// fmt: on
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: streamlit/streamlit
Commit Name: 289da8733f1d0faa48c30867093f944da839e341
Time: 2019-09-28
Author: treuille@users.noreply.github.com
File Name: lib/streamlit/hello.py
Class Name:
Method Name: data_frame_demo


Project Name: arviz-devs/arviz
Commit Name: 7c39ec18617738b2038662c0a94b0a250435a379
Time: 2018-07-11
Author: ColCarroll@users.noreply.github.com
File Name: arviz/plots/energyplot.py
Class Name:
Method Name: energyplot


Project Name: scikit-learn/scikit-learn
Commit Name: bf4714f40113ac4e6045d34d89905f146c5274b3
Time: 2020-08-19
Author: g.lemaitre58@gmail.com
File Name: examples/model_selection/plot_det.py
Class Name:
Method Name:


Project Name: comic/grand-challenge.org
Commit Name: d617d076b4722c4be8de6036cc31e35ef3972ae8
Time: 2017-06-14
Author: jamesmeakin@gmail.com
File Name: django/comicsite/templatetags/comic_templatetags.py
Class Name:
Method Name: render_anode09_result