MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_pandas_indexing_dates

Function test_pandas_indexing_dates

lib/matplotlib/tests/test_axes.py:7727–7735  ·  view source on GitHub ↗
(pd)

Source from the content-addressed store, hash-verified

7725
7726
7727def test_pandas_indexing_dates(pd):
7728 dates = np.arange('2005-02', '2005-03', dtype='datetime64[D]')
7729 values = np.sin(range(len(dates)))
7730 df = pd.DataFrame({'dates': dates, 'values': values})
7731
7732 ax = plt.gca()
7733
7734 without_zero_index = df[np.array(df.index) % 2 == 1].copy()
7735 ax.plot('dates', 'values', data=without_zero_index)
7736
7737
7738def test_pandas_errorbar_indexing(pd):

Callers

nothing calls this directly

Calls 3

gcaMethod · 0.80
copyMethod · 0.45
plotMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…