{"categories":["Python","pandas"],"provider_name":"Hatena Blog","version":"1.0","url":"https://nekoyukimmm.hatenablog.com/entry/2017/02/09/152224","author_name":"nekoyukimmm","type":"rich","provider_url":"https://hatena.blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnekoyukimmm.hatenablog.com%2Fentry%2F2017%2F02%2F09%2F152224\" title=\"&lt;Python, pandas&gt; \u7e26\u306b\u305a\u3089\u3059\u3002 - \u306d\u3053\u3086\u304d\u306e\u30e1\u30e2\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_url":"https://nekoyukimmm.hatenablog.com/","height":"190","description":"\u7e26\u306b\u305a\u3089\u3059\u3002 In [22]: df = pd.DataFrame({'a':[1,2,3,4,5,6]}) In [23]: df Out[23]: a 0 1 1 2 2 3 3 4 4 5 5 6 In [24]: df.shift(-1) Out[24]: a 0 2.0 1 3.0 2 4.0 3 5.0 4 6.0 5 NaN In [25]: df.shift(1) Out[25]: a 0 NaN 1 1.0 2 2.0 3 3.0 4 4.0 5 5.0 \u3075\u30fc\u3093\u3002 \u6a2a\u306b\u3082\u305a\u3089\u305b\u308b\u3002 In [26]: df = pd.DataFrame([[1,2,3],[4,5,6]]) I\u2026","author_url":"https://blog.hatena.ne.jp/nekoyukimmm/","width":"100%","title":"<Python, pandas> \u7e26\u306b\u305a\u3089\u3059\u3002","image_url":null,"published":"2017-02-09 15:22:24","blog_title":"\u306d\u3053\u3086\u304d\u306e\u30e1\u30e2"}