示例#1
0
    def test_boxplot_deprecated(self):
        df = pd.DataFrame(randn(6, 4),
                          index=list(string.ascii_letters[:6]),
                          columns=['one', 'two', 'three', 'four'])
        df['indic'] = ['foo', 'bar'] * 3

        with tm.assert_produces_warning(FutureWarning):
            plotting.boxplot(df, column=['one', 'two'], by='indic')
示例#2
0
    def test_boxplot_deprecated(self):
        df = pd.DataFrame(randn(6, 4),
                          index=list(string.ascii_letters[:6]),
                          columns=['one', 'two', 'three', 'four'])
        df['indic'] = ['foo', 'bar'] * 3

        with tm.assert_produces_warning(FutureWarning):
            plotting.boxplot(df, column=['one', 'two'],
                             by='indic')
示例#3
0
    def test_boxplot(self):
        df = DataFrame(np.random.randn(6, 4),
                       index=list(string.ascii_letters[:6]),
                       columns=['one', 'two', 'three', 'four'])
        df['indic'] = ['foo', 'bar'] * 3
        df['indic2'] = ['foo', 'bar', 'foo'] * 2

        _check_plot_works(df.boxplot)
        _check_plot_works(df.boxplot, column=['one', 'two'])
        _check_plot_works(df.boxplot, column=['one', 'two'], by='indic')
        _check_plot_works(df.boxplot, column='one', by=['indic', 'indic2'])
        _check_plot_works(df.boxplot, by='indic')
        _check_plot_works(df.boxplot, by=['indic', 'indic2'])

        _check_plot_works(lambda x: plotting.boxplot(x), df['one'])
示例#4
0
    def test_boxplot(self):
        df = DataFrame(np.random.randn(6, 4),
                       index=list(string.ascii_letters[:6]),
                       columns=['one', 'two', 'three', 'four'])
        df['indic'] = ['foo', 'bar'] * 3
        df['indic2'] = ['foo', 'bar', 'foo'] * 2

        _check_plot_works(df.boxplot)
        _check_plot_works(df.boxplot, column=['one', 'two'])
        _check_plot_works(df.boxplot, column=['one', 'two'],
                          by='indic')
        _check_plot_works(df.boxplot, column='one', by=['indic', 'indic2'])
        _check_plot_works(df.boxplot, by='indic')
        _check_plot_works(df.boxplot, by=['indic', 'indic2'])

        _check_plot_works(lambda x: plotting.boxplot(x), df['one'])
示例#5
0
    def test_boxplot(self):
        df = DataFrame(
            np.random.randn(6, 4), index=list(string.ascii_letters[:6]), columns=["one", "two", "three", "four"]
        )
        df["indic"] = ["foo", "bar"] * 3
        df["indic2"] = ["foo", "bar", "foo"] * 2

        _check_plot_works(df.boxplot)
        _check_plot_works(df.boxplot, column=["one", "two"])
        _check_plot_works(df.boxplot, column=["one", "two"], by="indic")
        _check_plot_works(df.boxplot, column="one", by=["indic", "indic2"])
        _check_plot_works(df.boxplot, by="indic")
        _check_plot_works(df.boxplot, by=["indic", "indic2"])

        _check_plot_works(lambda x: plotting.boxplot(x), df["one"])

        _check_plot_works(df.boxplot, notch=1)
        _check_plot_works(df.boxplot, by="indic", notch=1)