Offset 1, 5 lines modified | Offset 1, 5 lines modified | ||
1 | · | 1 | ·7dcfe82187f8d733571208a8efc493c2·10794668·doc·optional·python-pandas-doc_2.2.3+dfsg-9_all.deb |
2 | ·2 | 2 | ·52e39c879f6588836b2460888501de36·35964432·debug·optional·python3-pandas-lib-dbgsym_2.2.3+dfsg-9_amd64.deb |
3 | · | 3 | ·30519c1dc8612c8c539c463f8b1a6598·4594704·python·optional·python3-pandas-lib_2.2.3+dfsg-9_amd64.deb |
4 | ·6f05a87b66230b056112f4c7c394692b·3096828·python·optional·python3-pandas_2.2.3+dfsg-9_all.deb | 4 | ·6f05a87b66230b056112f4c7c394692b·3096828·python·optional·python3-pandas_2.2.3+dfsg-9_all.deb |
Offset 1, 3 lines modified | Offset 1, 3 lines modified | ||
1 | -rw-r--r--···0········0········0········4·2025-03-29·13:01:52.000000·debian-binary | 1 | -rw-r--r--···0········0········0········4·2025-03-29·13:01:52.000000·debian-binary |
2 | -rw-r--r--···0········0········0···1473 | 2 | -rw-r--r--···0········0········0···147368·2025-03-29·13:01:52.000000·control.tar.xz |
3 | -rw-r--r--···0········0········0·1064 | 3 | -rw-r--r--···0········0········0·10647108·2025-03-29·13:01:52.000000·data.tar.xz |
Offset 1, 13 lines modified | Offset 1, 13 lines modified | ||
1 | Package:·python-pandas-doc | 1 | Package:·python-pandas-doc |
2 | Source:·pandas | 2 | Source:·pandas |
3 | Version:·2.2.3+dfsg-9 | 3 | Version:·2.2.3+dfsg-9 |
4 | Architecture:·all | 4 | Architecture:·all |
5 | Maintainer:·Debian·Science·Team·<debian-science-maintainers@lists.alioth.debian.org> | 5 | Maintainer:·Debian·Science·Team·<debian-science-maintainers@lists.alioth.debian.org> |
6 | Installed-Size:·20990 | 6 | Installed-Size:·209908 |
7 | Depends:·libjs-sphinxdoc·(>=·8.1),·libjs-mathjax | 7 | Depends:·libjs-sphinxdoc·(>=·8.1),·libjs-mathjax |
8 | Suggests:·python3-pandas | 8 | Suggests:·python3-pandas |
9 | Section:·doc | 9 | Section:·doc |
10 | Priority:·optional | 10 | Priority:·optional |
11 | Multi-Arch:·foreign | 11 | Multi-Arch:·foreign |
12 | Homepage:·https://pandas.pydata.org/ | 12 | Homepage:·https://pandas.pydata.org/ |
13 | Description:·data·structures·for·"relational"·or·"labeled"·data·-·documentation | 13 | Description:·data·structures·for·"relational"·or·"labeled"·data·-·documentation |
Offset 6256, 84 lines modified | Offset 6256, 84 lines modified | ||
6256 | -rw-r--r--···0·root·········(0)·root·········(0)···210184·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/reference/series.html | 6256 | -rw-r--r--···0·root·········(0)·root·········(0)···210184·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/reference/series.html |
6257 | -rw-r--r--···0·root·········(0)·root·········(0)····48665·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/reference/style.html | 6257 | -rw-r--r--···0·root·········(0)·root·········(0)····48665·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/reference/style.html |
6258 | -rw-r--r--···0·root·········(0)·root·········(0)····48657·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/reference/testing.html | 6258 | -rw-r--r--···0·root·········(0)·root·········(0)····48657·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/reference/testing.html |
6259 | -rw-r--r--···0·root·········(0)·root·········(0)····53295·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/reference/window.html | 6259 | -rw-r--r--···0·root·········(0)·root·········(0)····53295·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/reference/window.html |
6260 | -rw-r--r--···0·root·········(0)·root·········(0)······244·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/release.html | 6260 | -rw-r--r--···0·root·········(0)·root·········(0)······244·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/release.html |
6261 | -rw-r--r--···0·root·········(0)·root·········(0)······269·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/reshaping.html | 6261 | -rw-r--r--···0·root·········(0)·root·········(0)······269·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/reshaping.html |
6262 | -rw-r--r--···0·root·········(0)·root·········(0)····17010·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/search.html | 6262 | -rw-r--r--···0·root·········(0)·root·········(0)····17010·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/search.html |
6263 | -rw-r--r--···0·root·········(0)·root·········(0)··2358 | 6263 | -rw-r--r--···0·root·········(0)·root·········(0)··2358745·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/searchindex.js |
6264 | -rw-r--r--···0·root·········(0)·root·········(0)······259·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/sparse.html | 6264 | -rw-r--r--···0·root·········(0)·root·········(0)······259·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/sparse.html |
6265 | -rw-r--r--···0·root·········(0)·root·········(0)······244·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/style.html | 6265 | -rw-r--r--···0·root·········(0)·root·········(0)······244·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/style.html |
6266 | -rw-r--r--···0·root·········(0)·root·········(0)······255·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/text.html | 6266 | -rw-r--r--···0·root·········(0)·root·········(0)······255·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/text.html |
6267 | -rw-r--r--···0·root·········(0)·root·········(0)······256·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/timedeltas.html | 6267 | -rw-r--r--···0·root·········(0)·root·········(0)······256·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/timedeltas.html |
6268 | -rw-r--r--···0·root·········(0)·root·········(0)······277·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/timeseries.html | 6268 | -rw-r--r--···0·root·········(0)·root·········(0)······277·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/timeseries.html |
6269 | -rw-r--r--···0·root·········(0)·root·········(0)······272·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/tutorials.html | 6269 | -rw-r--r--···0·root·········(0)·root·········(0)······272·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/tutorials.html |
6270 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/ | 6270 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/ |
6271 | -rw-r--r--···0·root·········(0)·root·········(0)···171380·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/10min.html | 6271 | -rw-r--r--···0·root·········(0)·root·········(0)···171380·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/10min.html |
6272 | -rw-r--r--···0·root·········(0)·root·········(0)···28383 | 6272 | -rw-r--r--···0·root·········(0)·root·········(0)···283834·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/advanced.html |
6273 | -rw-r--r--···0·root·········(0)·root·········(0)···436075·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/basics.html | 6273 | -rw-r--r--···0·root·········(0)·root·········(0)···436075·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/basics.html |
6274 | -rw-r--r--···0·root·········(0)·root·········(0)····36646·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/boolean.html | 6274 | -rw-r--r--···0·root·········(0)·root·········(0)····36646·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/boolean.html |
6275 | -rw-r--r--···0·root·········(0)·root·········(0)···217515·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/categorical.html | 6275 | -rw-r--r--···0·root·········(0)·root·········(0)···217515·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/categorical.html |
6276 | -rw-r--r--···0·root·········(0)·root·········(0)····18313·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/cookbook.html | 6276 | -rw-r--r--···0·root·········(0)·root·········(0)····18313·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/cookbook.html |
6277 | -rw-r--r--···0·root·········(0)·root·········(0)····66125·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/copy_on_write.html | 6277 | -rw-r--r--···0·root·········(0)·root·········(0)····66125·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/copy_on_write.html |
6278 | -rw-r--r--···0·root·········(0)·root·········(0)···160414·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/dsintro.html | 6278 | -rw-r--r--···0·root·········(0)·root·········(0)···160414·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/dsintro.html |
6279 | -rw-r--r--···0·root·········(0)·root·········(0)····81376·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/duplicates.html | 6279 | -rw-r--r--···0·root·········(0)·root·········(0)····81376·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/duplicates.html |
6280 | -rw-r--r--···0·root·········(0)·root·········(0)···115 | 6280 | -rw-r--r--···0·root·········(0)·root·········(0)···115716·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/enhancingperf.html |
6281 | -rw-r--r--···0·root·········(0)·root·········(0)···107882·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/gotchas.html | 6281 | -rw-r--r--···0·root·········(0)·root·········(0)···107882·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/gotchas.html |
6282 | -rw-r--r--···0·root·········(0)·root·········(0)···300850·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/groupby.html | 6282 | -rw-r--r--···0·root·········(0)·root·········(0)···300850·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/groupby.html |
6283 | -rw-r--r--···0·root·········(0)·root·········(0)····59715·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/index.html | 6283 | -rw-r--r--···0·root·········(0)·root·········(0)····59715·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/index.html |
6284 | -rw-r--r--···0·root·········(0)·root·········(0)···395484·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/indexing.html | 6284 | -rw-r--r--···0·root·········(0)·root·········(0)···395484·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/indexing.html |
6285 | -rw-r--r--···0·root·········(0)·root·········(0)····41778·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/integer_na.html | 6285 | -rw-r--r--···0·root·········(0)·root·········(0)····41778·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/integer_na.html |
6286 | -rw-r--r--···0·root·········(0)·root·········(0)··1145820·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/io.html | 6286 | -rw-r--r--···0·root·········(0)·root·········(0)··1145820·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/io.html |
6287 | -rw-r--r--···0·root·········(0)·root·········(0)···208885·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/merging.html | 6287 | -rw-r--r--···0·root·········(0)·root·········(0)···208885·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/merging.html |
6288 | -rw-r--r--···0·root·········(0)·root·········(0)···178690·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/missing_data.html | 6288 | -rw-r--r--···0·root·········(0)·root·········(0)···178690·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/missing_data.html |
6289 | -rw-r--r--···0·root·········(0)·root·········(0)···112153·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/options.html | 6289 | -rw-r--r--···0·root·········(0)·root·········(0)···112153·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/options.html |
6290 | -rw-r--r--···0·root·········(0)·root·········(0)···147524·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/pyarrow.html | 6290 | -rw-r--r--···0·root·········(0)·root·········(0)···147524·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/pyarrow.html |
6291 | -rw-r--r--···0·root·········(0)·root·········(0)···162660·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/reshaping.html | 6291 | -rw-r--r--···0·root·········(0)·root·········(0)···162660·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/reshaping.html |
6292 | -rw-r--r--···0·root·········(0)·root·········(0)···11558 | 6292 | -rw-r--r--···0·root·········(0)·root·········(0)···115582·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/scale.html |
6293 | -rw-r--r--···0·root·········(0)·root·········(0)····65863·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/sparse.html | 6293 | -rw-r--r--···0·root·········(0)·root·········(0)····65863·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/sparse.html |
6294 | -rw-r--r--···0·root·········(0)·root·········(0)···698240·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/style.html | 6294 | -rw-r--r--···0·root·········(0)·root·········(0)···698240·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/style.html |
6295 | -rw-r--r--···0·root·········(0)·root·········(0)····878 | 6295 | -rw-r--r--···0·root·········(0)·root·········(0)····87892·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/style.ipynb.gz |
6296 | -rw-r--r--···0·root·········(0)·root·········(0)···165302·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/text.html | 6296 | -rw-r--r--···0·root·········(0)·root·········(0)···165302·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/text.html |
6297 | -rw-r--r--···0·root·········(0)·root·········(0)···100947·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/timedeltas.html | 6297 | -rw-r--r--···0·root·········(0)·root·········(0)···100947·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/timedeltas.html |
6298 | -rw-r--r--···0·root·········(0)·root·········(0)···486621·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/timeseries.html | 6298 | -rw-r--r--···0·root·········(0)·root·········(0)···486621·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/timeseries.html |
6299 | -rw-r--r--···0·root·········(0)·root·········(0)···204461·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/visualization.html | 6299 | -rw-r--r--···0·root·········(0)·root·········(0)···204461·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/visualization.html |
6300 | -rw-r--r--···0·root·········(0)·root·········(0)···141947·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/window.html | 6300 | -rw-r--r--···0·root·········(0)·root·········(0)···141947·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/user_guide/window.html |
6301 | -rw-r--r--···0·root·········(0)·root·········(0)······270·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/visualization.html | 6301 | -rw-r--r--···0·root·········(0)·root·········(0)······270·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/visualization.html |
6302 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/ | 6302 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/ |
6303 | -rw-r--r--···0·root·········(0)·root·········(0)···107681·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/index.html | 6303 | -rw-r--r--···0·root·········(0)·root·········(0)···107681·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/index.html |
6304 | -rw-r--r--···0·root·········(0)·root·········(0)····10569·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/index.html.gz | 6304 | -rw-r--r--···0·root·········(0)·root·········(0)····10569·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/index.html.gz |
6305 | -rw-r--r--···0·root·········(0)·root·········(0)····83987·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.10.0.html | 6305 | -rw-r--r--···0·root·········(0)·root·········(0)····83987·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.10.0.html |
6306 | -rw-r--r--···0·root·········(0)·root·········(0)····66492·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.10.1.html | 6306 | -rw-r--r--···0·root·········(0)·root·········(0)····66492·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.10.1.html |
6307 | -rw-r--r--···0·root·········(0)·root·········(0)····82312·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.11.0.html | 6307 | -rw-r--r--···0·root·········(0)·root·········(0)····82312·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.11.0.html |
6308 | -rw-r--r--···0·root·········(0)·root·········(0)···104316·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.12.0.html | 6308 | -rw-r--r--···0·root·········(0)·root·········(0)···104316·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.12.0.html |
6309 | -rw-r--r--···0·root·········(0)·root·········(0)···22251 | 6309 | -rw-r--r--···0·root·········(0)·root·········(0)···222510·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.13.0.html |
6310 | -rw-r--r--···0·root·········(0)·root·········(0)····89385·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.13.1.html | 6310 | -rw-r--r--···0·root·········(0)·root·········(0)····89385·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.13.1.html |
6311 | -rw-r--r--···0·root·········(0)·root·········(0)···243730·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.14.0.html | 6311 | -rw-r--r--···0·root·········(0)·root·········(0)···243730·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.14.0.html |
6312 | -rw-r--r--···0·root·········(0)·root·········(0)····83262·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.14.1.html | 6312 | -rw-r--r--···0·root·········(0)·root·········(0)····83262·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.14.1.html |
6313 | -rw-r--r--···0·root·········(0)·root·········(0)···252303·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.15.0.html | 6313 | -rw-r--r--···0·root·········(0)·root·········(0)···252303·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.15.0.html |
6314 | -rw-r--r--···0·root·········(0)·root·········(0)····68280·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.15.1.html | 6314 | -rw-r--r--···0·root·········(0)·root·········(0)····68280·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.15.1.html |
6315 | -rw-r--r--···0·root·········(0)·root·········(0)····75115·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.15.2.html | 6315 | -rw-r--r--···0·root·········(0)·root·········(0)····75115·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.15.2.html |
6316 | -rw-r--r--···0·root·········(0)·root·········(0)···145199·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.16.0.html | 6316 | -rw-r--r--···0·root·········(0)·root·········(0)···145199·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.16.0.html |
6317 | -rw-r--r--···0·root·········(0)·root·········(0)···115518·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.16.1.html | 6317 | -rw-r--r--···0·root·········(0)·root·········(0)···115518·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.16.1.html |
6318 | -rw-r--r--···0·root·········(0)·root·········(0)····64656·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.16.2.html | 6318 | -rw-r--r--···0·root·········(0)·root·········(0)····64656·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.16.2.html |
6319 | -rw-r--r--···0·root·········(0)·root·········(0)···231394·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.17.0.html | 6319 | -rw-r--r--···0·root·········(0)·root·········(0)···231394·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.17.0.html |
6320 | -rw-r--r--···0·root·········(0)·root·········(0)····95028·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.17.1.html | 6320 | -rw-r--r--···0·root·········(0)·root·········(0)····95028·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.17.1.html |
6321 | -rw-r--r--···0·root·········(0)·root·········(0)···224091·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.18.0.html | 6321 | -rw-r--r--···0·root·········(0)·root·········(0)···224091·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.18.0.html |
6322 | -rw-r--r--···0·root·········(0)·root·········(0)···171 | 6322 | -rw-r--r--···0·root·········(0)·root·········(0)···171888·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.18.1.html |
6323 | -rw-r--r--···0·root·········(0)·root·········(0)···3 | 6323 | -rw-r--r--···0·root·········(0)·root·········(0)···350916·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.19.0.html |
6324 | -rw-r--r--···0·root·········(0)·root·········(0)····45179·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.19.1.html | 6324 | -rw-r--r--···0·root·········(0)·root·········(0)····45179·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.19.1.html |
6325 | -rw-r--r--···0·root·········(0)·root·········(0)····48525·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.19.2.html | 6325 | -rw-r--r--···0·root·········(0)·root·········(0)····48525·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.19.2.html |
6326 | -rw-r--r--···0·root·········(0)·root·········(0)···40 | 6326 | -rw-r--r--···0·root·········(0)·root·········(0)···407739·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.20.0.html |
6327 | -rw-r--r--···0·root·········(0)·root·········(0)····52898·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.20.2.html | 6327 | -rw-r--r--···0·root·········(0)·root·········(0)····52898·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.20.2.html |
6328 | -rw-r--r--···0·root·········(0)·root·········(0)····43404·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.20.3.html | 6328 | -rw-r--r--···0·root·········(0)·root·········(0)····43404·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.20.3.html |
6329 | -rw-r--r--···0·root·········(0)·root·········(0)···255 | 6329 | -rw-r--r--···0·root·········(0)·root·········(0)···255811·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.21.0.html |
6330 | -rw-r--r--···0·root·········(0)·root·········(0)····61789·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.21.1.html | 6330 | -rw-r--r--···0·root·········(0)·root·········(0)····61789·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.21.1.html |
6331 | -rw-r--r--···0·root·········(0)·root·········(0)····598 | 6331 | -rw-r--r--···0·root·········(0)·root·········(0)····59896·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.22.0.html |
6332 | -rw-r--r--···0·root·········(0)·root·········(0)···40 | 6332 | -rw-r--r--···0·root·········(0)·root·········(0)···402831·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.23.0.html |
6333 | -rw-r--r--···0·root·········(0)·root·········(0)····59871·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.23.1.html | 6333 | -rw-r--r--···0·root·········(0)·root·········(0)····59871·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.23.1.html |
6334 | -rw-r--r--···0·root·········(0)·root·········(0)····52005·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.23.2.html | 6334 | -rw-r--r--···0·root·········(0)·root·········(0)····52005·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.23.2.html |
6335 | -rw-r--r--···0·root·········(0)·root·········(0)····32373·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.23.3.html | 6335 | -rw-r--r--···0·root·········(0)·root·········(0)····32373·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.23.3.html |
6336 | -rw-r--r--···0·root·········(0)·root·········(0)····35785·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.23.4.html | 6336 | -rw-r--r--···0·root·········(0)·root·········(0)····35785·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.23.4.html |
6337 | -rw-r--r--···0·root·········(0)·root·········(0)···520683·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.24.0.html | 6337 | -rw-r--r--···0·root·········(0)·root·········(0)···520683·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.24.0.html |
6338 | -rw-r--r--···0·root·········(0)·root·········(0)····44717·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.24.1.html | 6338 | -rw-r--r--···0·root·········(0)·root·········(0)····44717·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.24.1.html |
6339 | -rw-r--r--···0·root·········(0)·root·········(0)····49347·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.24.2.html | 6339 | -rw-r--r--···0·root·········(0)·root·········(0)····49347·2025-03-29·13:01:52.000000·./usr/share/doc/python-pandas-doc/html/whatsnew/v0.24.2.html |
Offset 21510, 28 lines modified | Offset 21510, 28 lines modified | ||
21510 | ········"003494":·15, | 21510 | ········"003494":·15, |
21511 | ········"003507":·[2209,·2218], | 21511 | ········"003507":·[2209,·2218], |
21512 | ········"003556":·2207, | 21512 | ········"003556":·2207, |
21513 | ········"00360":·2294, | 21513 | ········"00360":·2294, |
21514 | ········"003733":·2207, | 21514 | ········"003733":·2207, |
21515 | ········"003932":·2216, | 21515 | ········"003932":·2216, |
21516 | ········"003945":·2210, | 21516 | ········"003945":·2210, |
21517 | ········"004":·[2186,·2 | 21517 | ········"004":·[2186,·2227], |
21518 | ········"004000":·2232, | 21518 | ········"004000":·2232, |
21519 | ········"004005006":·[287,·939], | 21519 | ········"004005006":·[287,·939], |
21520 | ········"004054":·2229, | 21520 | ········"004054":·2229, |
21521 | ········"004091":·[2204,·2257], | 21521 | ········"004091":·[2204,·2257], |
21522 | ········"004127":·2207, | 21522 | ········"004127":·2207, |
21523 | ········"004194":·2186, | 21523 | ········"004194":·2186, |
21524 | ········"004201":·2186, | 21524 | ········"004201":·2186, |
21525 | ········"004229":·2186, | 21525 | ········"004229":·2186, |
21526 | ········"004474":·2184, | 21526 | ········"004474":·2184, |
21527 | ········"004580":·2210, | 21527 | ········"004580":·2210, |
21528 | ········"00486":·30, | 21528 | ········"00486":·30, |
21529 | ········"004956":·2207, | 21529 | ········"004956":·2207, |
21530 | ········"005":· | 21530 | ········"005":·2209, |
21531 | ········"005000":·2218, | 21531 | ········"005000":·2218, |
21532 | ········"005361":·2207, | 21532 | ········"005361":·2207, |
21533 | ········"005383":·2220, | 21533 | ········"005383":·2220, |
21534 | ········"005446":·2219, | 21534 | ········"005446":·2219, |
21535 | ········"005462":·2191, | 21535 | ········"005462":·2191, |
21536 | ········"005977":·2199, | 21536 | ········"005977":·2199, |
21537 | ········"005979":·2186, | 21537 | ········"005979":·2186, |
Offset 21549, 15 lines modified | Offset 21549, 14 lines modified | ||
21549 | ········"007200":·2184, | 21549 | ········"007200":·2184, |
21550 | ········"007207":·[2184,·2214], | 21550 | ········"007207":·[2184,·2214], |
21551 | ········"007717":·2199, | 21551 | ········"007717":·2199, |
21552 | ········"007824":·15, | 21552 | ········"007824":·15, |
21553 | ········"007952":·2207, | 21553 | ········"007952":·2207, |
21554 | ········"007996":·2186, | 21554 | ········"007996":·2186, |
21555 | ········"007f":·203, | 21555 | ········"007f":·203, |
21556 | ········"008":·2193, | ||
21557 | ········"008182":·2204, | 21556 | ········"008182":·2204, |
21558 | ········"008298":·2186, | 21557 | ········"008298":·2186, |
21559 | ········"008344":·2207, | 21558 | ········"008344":·2207, |
21560 | ········"008358":·2207, | 21559 | ········"008358":·2207, |
21561 | ········"008500":·15, | 21560 | ········"008500":·15, |
21562 | ········"008543":·[102,·1158], | 21561 | ········"008543":·[102,·1158], |
21563 | ········"008943":·[102,·1158], | 21562 | ········"008943":·[102,·1158], |
Offset 21648, 15 lines modified | Offset 21647, 15 lines modified | ||
21648 | ········"018193":·2207, | 21647 | ········"018193":·2207, |
21649 | ········"018409":·2207, | 21648 | ········"018409":·2207, |
21650 | ········"018601":·[2184,·2214], | 21649 | ········"018601":·[2184,·2214], |
21651 | ········"018808":·2207, | 21650 | ········"018808":·2207, |
21652 | ········"018904":·2207, | 21651 | ········"018904":·2207, |
21653 | ········"018941":·2207, | 21652 | ········"018941":·2207, |
21654 | ········"018993":·2214, | 21653 | ········"018993":·2214, |
21655 | ········"019":· | 21654 | ········"019":·2207, |
21656 | ········"019449":·2207, | 21655 | ········"019449":·2207, |
21657 | ········"019794":·2197, | 21656 | ········"019794":·2197, |
21658 | ········"01t00":·[2163,·2199,·2210,·2235,·2246,·2261], | 21657 | ········"01t00":·[2163,·2199,·2210,·2235,·2246,·2261], |
21659 | ········"01t01":·2210, | 21658 | ········"01t01":·2210, |
21660 | ········"01t03":·2210, | 21659 | ········"01t03":·2210, |
21661 | ········"01t05":·[909,·2210,·2235], | 21660 | ········"01t05":·[909,·2210,·2235], |
21662 | ········"01t07":·1280, | 21661 | ········"01t07":·1280, |
Offset 21725, 15 lines modified | Offset 21724, 15 lines modified | ||
21725 | ········"028152":·2207, | 21724 | ········"028152":·2207, |
21726 | ········"028166":·15, | 21725 | ········"028166":·15, |
21727 | ········"028182":·2207, | 21726 | ········"028182":·2207, |
21728 | ········"028578":·2207, | 21727 | ········"028578":·2207, |
21729 | ········"028603":·2195, | 21728 | ········"028603":·2195, |
21730 | ········"028662":·28, | 21729 | ········"028662":·28, |
21731 | ········"028665":·15, | 21730 | ········"028665":·15, |
21732 | ········"029":·[2186,·2 | 21731 | ········"029":·[2186,·2227], |
21733 | ········"029302":·2191, | 21732 | ········"029302":·2191, |
21734 | ········"029399":·2184, | 21733 | ········"029399":·2184, |
21735 | ········"029582":·2207, | 21734 | ········"029582":·2207, |
21736 | ········"029587":·2193, | 21735 | ········"029587":·2193, |
21737 | ········"029630":·2195, | 21736 | ········"029630":·2195, |
21738 | ········"029766":·2197, | 21737 | ········"029766":·2197, |
21739 | ········"02d":·2205, | 21738 | ········"02d":·2205, |
Offset 21787, 28 lines modified | Offset 21786, 29 lines modified | ||
21787 | ········"034870":·2207, | 21786 | ········"034870":·2207, |
21788 | ········"034899":·2186, | 21787 | ········"034899":·2186, |
21789 | ········"034905":·2207, | 21788 | ········"034905":·2207, |
21790 | ········"035310":·2220, | 21789 | ········"035310":·2220, |
21791 | ········"035312":·2210, | 21790 | ········"035312":·2210, |
21792 | ········"035476":·2210, | 21791 | ········"035476":·2210, |
21793 | ········"035962":·2186, | 21792 | ········"035962":·2186, |
21793 | ········"036":·2193, | ||
21794 | ········"036047":·2214, | 21794 | ········"036047":·2214, |
21795 | ········"036104":·2207, | 21795 | ········"036104":·2207, |
21796 | ········"036142":·[2220,·2231], | 21796 | ········"036142":·[2220,·2231], |
21797 | ········"0362":·2202, | 21797 | ········"0362":·2202, |
21798 | ········"0362196":·2202, | 21798 | ········"0362196":·2202, |
21799 | ········"036235":·2205, | 21799 | ········"036235":·2205, |
21800 | ········"036660":·2199, | 21800 | ········"036660":·2199, |
21801 | ········"036854":·2199, | 21801 | ········"036854":·2199, |
21802 | ········"037181":·2191, | 21802 | ········"037181":·2191, |
21803 | ········"037528":·2235, | 21803 | ········"037528":·2235, |
21804 | ········"037651":·2207, | 21804 | ········"037651":·2207, |
21805 | ········"037772":·2214, | 21805 | ········"037772":·2214, |
21806 | ········"037882":·[2184,·2214], | 21806 | ········"037882":·[2184,·2214], |
21807 | ········"038":·[1447,·2200,·2232], | 21807 | ········"038":·[1447,·2193,·2200,·2232], |
21808 | ········"038031":·2207, | 21808 | ········"038031":·2207, |
21809 | ········"038402":·2197, | 21809 | ········"038402":·2197, |
21810 | ········"038981":·2207, | 21810 | ········"038981":·2207, |
21811 | ········"039061":·2207, | 21811 | ········"039061":·2207, |
21812 | ········"039147":·2207, | 21812 | ········"039147":·2207, |
21813 | ········"039266":·2215, | 21813 | ········"039266":·2215, |
21814 | ········"039268":·[15,·2185,·2186,·2191,·2197,·2199,·2202,·2204,·2215,·2216,·2218,·2219,·2235,·2241,·2264], | 21814 | ········"039268":·[15,·2185,·2186,·2191,·2197,·2199,·2202,·2204,·2215,·2216,·2218,·2219,·2235,·2241,·2264], |
Offset 21852, 14 lines modified | Offset 21852, 15 lines modified | ||
21852 | ········"044125":·2207, | 21852 | ········"044125":·2207, |
21853 | ········"044184":·2199, | 21853 | ········"044184":·2199, |
21854 | ········"0442":·[2184,·2186], | 21854 | ········"0442":·[2184,·2186], |
21855 | ········"044236":·[16,·17,·18,·19,·2184,·2185,·2186,·2191,·2195,·2197,·2199,·2202,·2210,·2214,·2215,·2216,·2218,·2220,·2225,·2235,·2241,·2260], | 21855 | ········"044236":·[16,·17,·18,·19,·2184,·2185,·2186,·2191,·2195,·2197,·2199,·2202,·2210,·2214,·2215,·2216,·2218,·2220,·2225,·2235,·2241,·2260], |
21856 | ········"044522":·586, | 21856 | ········"044522":·586, |
21857 | ········"044546":·2207, | 21857 | ········"044546":·2207, |
21858 | ········"044933":·2207, | 21858 | ········"044933":·2207, |
21859 | ········"045":·2193, | ||
21859 | ········"045691":·2191, | 21860 | ········"045691":·2191, |
21860 | ········"045759":·2207, | 21861 | ········"045759":·2207, |
21861 | ········"045976":·2214, | 21862 | ········"045976":·2214, |
21862 | ········"046":·2207, | 21863 | ········"046":·2207, |
21863 | ········"046044":·2199, | 21864 | ········"046044":·2199, |
21864 | ········"046582":·2207, | 21865 | ········"046582":·2207, |
21865 | ········"046611":·2210, | 21866 | ········"046611":·2210, |
Offset 21912, 14 lines modified | Offset 21913, 15 lines modified | ||
21912 | ········"052021":·2210, | 21913 | ········"052021":·2210, |
21913 | ········"052127":·2207, | 21914 | ········"052127":·2207, |
21914 | ········"052580":·2195, | 21915 | ········"052580":·2195, |
21915 | ········"052589":·2193, | 21916 | ········"052589":·2193, |
Max diff block lines reached; 81043/84749 bytes (95.63%) of diff not shown. |
Offset 1847, 25 lines modified | Offset 1847, 25 lines modified | ||
1847 | <span·class="gp">In·[141]:·</span><span·class="n">indexer</span>·<span·class="o">=</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">arange</span><span·class="p">(</span><span·class="mi">10000</span><span·class="p">)</span> | 1847 | <span·class="gp">In·[141]:·</span><span·class="n">indexer</span>·<span·class="o">=</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">arange</span><span·class="p">(</span><span·class="mi">10000</span><span·class="p">)</span> |
1848 | <span·class="gp">In·[142]:·</span><span·class="n">random</span><span·class="o">.</span><span·class="n">shuffle</span><span·class="p">(</span><span·class="n">indexer</span><span·class="p">)</span> | 1848 | <span·class="gp">In·[142]:·</span><span·class="n">random</span><span·class="o">.</span><span·class="n">shuffle</span><span·class="p">(</span><span·class="n">indexer</span><span·class="p">)</span> |
1849 | <span·class="gp">In·[143]:·</span><span·class="o">%</span><span·class="k">timeit</span>·arr[indexer] | 1849 | <span·class="gp">In·[143]:·</span><span·class="o">%</span><span·class="k">timeit</span>·arr[indexer] |
1850 | <span·class="gp">···.....:·</span><span·class="o">%</span><span·class="k">timeit</span>·arr.take(indexer,·axis=0) | 1850 | <span·class="gp">···.....:·</span><span·class="o">%</span><span·class="k">timeit</span>·arr.take(indexer,·axis=0) |
1851 | <span·class="gp">···.....:·</span> | 1851 | <span·class="gp">···.....:·</span> |
1852 | <span·class="go">232·us·+-·812·ns·per·loop·(mean·+-·std.·dev.·of·7·runs,·1,000·loops·each)</span> | ||
1853 | <span·class="go"> | 1852 | <span·class="go">542·us·+-·55.4·us·per·loop·(mean·+-·std.·dev.·of·7·runs,·1,000·loops·each)</span> |
1853 | <span·class="go">136·us·+-·16.5·us·per·loop·(mean·+-·std.·dev.·of·7·runs,·10,000·loops·each)</span> | ||
1854 | </pre></div> | 1854 | </pre></div> |
1855 | </div> | 1855 | </div> |
1856 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[144]:·</span><span·class="n">ser</span>·<span·class="o">=</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">Series</span><span·class="p">(</span><span·class="n">arr</span><span·class="p">[:,</span>·<span·class="mi">0</span><span·class="p">])</span> | 1856 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[144]:·</span><span·class="n">ser</span>·<span·class="o">=</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">Series</span><span·class="p">(</span><span·class="n">arr</span><span·class="p">[:,</span>·<span·class="mi">0</span><span·class="p">])</span> |
1857 | <span·class="gp">In·[145]:·</span><span·class="o">%</span><span·class="k">timeit</span>·ser.iloc[indexer] | 1857 | <span·class="gp">In·[145]:·</span><span·class="o">%</span><span·class="k">timeit</span>·ser.iloc[indexer] |
1858 | <span·class="gp">···.....:·</span><span·class="o">%</span><span·class="k">timeit</span>·ser.take(indexer) | 1858 | <span·class="gp">···.....:·</span><span·class="o">%</span><span·class="k">timeit</span>·ser.take(indexer) |
1859 | <span·class="gp">···.....:·</span> | 1859 | <span·class="gp">···.....:·</span> |
1860 | <span·class="go">144·us·+-·2.17·us·per·loop·(mean·+-·std.·dev.·of·7·runs,·10,000·loops·each)</span> | ||
1861 | <span·class="go"> | 1860 | <span·class="go">280·us·+-·17.1·us·per·loop·(mean·+-·std.·dev.·of·7·runs,·1,000·loops·each)</span> |
1861 | <span·class="go">346·us·+-·65.5·us·per·loop·(mean·+-·std.·dev.·of·7·runs,·1,000·loops·each)</span> | ||
1862 | </pre></div> | 1862 | </pre></div> |
1863 | </div> | 1863 | </div> |
1864 | </section> | 1864 | </section> |
1865 | <section·id="index-types"> | 1865 | <section·id="index-types"> |
1866 | <span·id="advanced-index-types"></span><h2>Index·types<a·class="headerlink"·href="#index-types"·title="Link·to·this·heading">#</a></h2> | 1866 | <span·id="advanced-index-types"></span><h2>Index·types<a·class="headerlink"·href="#index-types"·title="Link·to·this·heading">#</a></h2> |
1867 | <p>We·have·discussed·<code·class="docutils·literal·notranslate"><span·class="pre">MultiIndex</span></code>·in·the·previous·sections·pretty·extensively. | 1867 | <p>We·have·discussed·<code·class="docutils·literal·notranslate"><span·class="pre">MultiIndex</span></code>·in·the·previous·sections·pretty·extensively. |
1868 | Documentation·about·<code·class="docutils·literal·notranslate"><span·class="pre">DatetimeIndex</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">PeriodIndex</span></code>·are·shown·<a·class="reference·internal"·href="timeseries.html#timeseries-overview"><span·class="std·std-ref">here</span></a>, | 1868 | Documentation·about·<code·class="docutils·literal·notranslate"><span·class="pre">DatetimeIndex</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">PeriodIndex</span></code>·are·shown·<a·class="reference·internal"·href="timeseries.html#timeseries-overview"><span·class="std·std-ref">here</span></a>, |
Offset 1245, 23 lines modified | Offset 1245, 23 lines modified | ||
1245 | In·[141]:·indexer·=·np.arange(10000) | 1245 | In·[141]:·indexer·=·np.arange(10000) |
1246 | In·[142]:·random.shuffle(indexer) | 1246 | In·[142]:·random.shuffle(indexer) |
1247 | In·[143]:·%timeit·arr[indexer] | 1247 | In·[143]:·%timeit·arr[indexer] |
1248 | ···.....:·%timeit·arr.take(indexer,·axis=0) | 1248 | ···.....:·%timeit·arr.take(indexer,·axis=0) |
1249 | ···.....: | 1249 | ···.....: |
1250 | 232·us·+-·812·ns·per·loop·(mean·+-·std.·dev.·of·7·runs,·1,000·loops·each) | ||
1251 | 1250 | 542·us·+-·55.4·us·per·loop·(mean·+-·std.·dev.·of·7·runs,·1,000·loops·each) | |
1251 | 136·us·+-·16.5·us·per·loop·(mean·+-·std.·dev.·of·7·runs,·10,000·loops·each) | ||
1252 | In·[144]:·ser·=·pd.Series(arr[:,·0]) | 1252 | In·[144]:·ser·=·pd.Series(arr[:,·0]) |
1253 | In·[145]:·%timeit·ser.iloc[indexer] | 1253 | In·[145]:·%timeit·ser.iloc[indexer] |
1254 | ···.....:·%timeit·ser.take(indexer) | 1254 | ···.....:·%timeit·ser.take(indexer) |
1255 | ···.....: | 1255 | ···.....: |
1256 | 144·us·+-·2.17·us·per·loop·(mean·+-·std.·dev.·of·7·runs,·10,000·loops·each) | ||
1257 | 1256 | 280·us·+-·17.1·us·per·loop·(mean·+-·std.·dev.·of·7·runs,·1,000·loops·each) | |
1257 | 346·us·+-·65.5·us·per·loop·(mean·+-·std.·dev.·of·7·runs,·1,000·loops·each) | ||
1258 | *\x8**\x8**\x8**\x8**\x8*·I\x8In\x8nd\x8de\x8ex\x8x·t\x8ty\x8yp\x8pe\x8es\x8s_\x8#\x8#·*\x8**\x8**\x8**\x8**\x8* | 1258 | *\x8**\x8**\x8**\x8**\x8*·I\x8In\x8nd\x8de\x8ex\x8x·t\x8ty\x8yp\x8pe\x8es\x8s_\x8#\x8#·*\x8**\x8**\x8**\x8**\x8* |
1259 | We·have·discussed·MultiIndex·in·the·previous·sections·pretty·extensively. | 1259 | We·have·discussed·MultiIndex·in·the·previous·sections·pretty·extensively. |
1260 | Documentation·about·DatetimeIndex·and·PeriodIndex·are·shown·_\x8h_\x8e_\x8r_\x8e,·and | 1260 | Documentation·about·DatetimeIndex·and·PeriodIndex·are·shown·_\x8h_\x8e_\x8r_\x8e,·and |
1261 | documentation·about·TimedeltaIndex·is·found·_\x8h_\x8e_\x8r_\x8e. | 1261 | documentation·about·TimedeltaIndex·is·found·_\x8h_\x8e_\x8r_\x8e. |
1262 | In·the·following·sub-sections·we·will·highlight·some·other·index·types. | 1262 | In·the·following·sub-sections·we·will·highlight·some·other·index·types. |
1263 | *\x8**\x8**\x8**\x8*·C\x8Ca\x8at\x8te\x8eg\x8go\x8or\x8ri\x8ic\x8ca\x8al\x8lI\x8In\x8nd\x8de\x8ex\x8x_\x8#\x8#·*\x8**\x8**\x8**\x8* | 1263 | *\x8**\x8**\x8**\x8*·C\x8Ca\x8at\x8te\x8eg\x8go\x8or\x8ri\x8ic\x8ca\x8al\x8lI\x8In\x8nd\x8de\x8ex\x8x_\x8#\x8#·*\x8**\x8**\x8**\x8* |
1264 | _\x8C_\x8a_\x8t_\x8e_\x8g_\x8o_\x8r_\x8i_\x8c_\x8a_\x8l_\x8I_\x8n_\x8d_\x8e_\x8x·is·a·type·of·index·that·is·useful·for·supporting·indexing·with | 1264 | _\x8C_\x8a_\x8t_\x8e_\x8g_\x8o_\x8r_\x8i_\x8c_\x8a_\x8l_\x8I_\x8n_\x8d_\x8e_\x8x·is·a·type·of·index·that·is·useful·for·supporting·indexing·with |
Offset 592, 31 lines modified | Offset 592, 31 lines modified | ||
592 | <span·class="gp">···...:·</span>········<span·class="n">s</span>·<span·class="o">+=</span>·<span·class="n">f</span><span·class="p">(</span><span·class="n">a</span>·<span·class="o">+</span>·<span·class="n">i</span>·<span·class="o">*</span>·<span·class="n">dx</span><span·class="p">)</span> | 592 | <span·class="gp">···...:·</span>········<span·class="n">s</span>·<span·class="o">+=</span>·<span·class="n">f</span><span·class="p">(</span><span·class="n">a</span>·<span·class="o">+</span>·<span·class="n">i</span>·<span·class="o">*</span>·<span·class="n">dx</span><span·class="p">)</span> |
593 | <span·class="gp">···...:·</span>····<span·class="k">return</span>·<span·class="n">s</span>·<span·class="o">*</span>·<span·class="n">dx</span> | 593 | <span·class="gp">···...:·</span>····<span·class="k">return</span>·<span·class="n">s</span>·<span·class="o">*</span>·<span·class="n">dx</span> |
594 | <span·class="gp">···...:·</span> | 594 | <span·class="gp">···...:·</span> |
595 | </pre></div> | 595 | </pre></div> |
596 | </div> | 596 | </div> |
597 | <p>We·achieve·our·result·by·using·<a·class="reference·internal"·href="../reference/api/pandas.DataFrame.apply.html#pandas.DataFrame.apply"·title="pandas.DataFrame.apply"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">DataFrame.apply()</span></code></a>·(row-wise):</p> | 597 | <p>We·achieve·our·result·by·using·<a·class="reference·internal"·href="../reference/api/pandas.DataFrame.apply.html#pandas.DataFrame.apply"·title="pandas.DataFrame.apply"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">DataFrame.apply()</span></code></a>·(row-wise):</p> |
598 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[5]:·</span><span·class="o">%</span><span·class="k">timeit</span>·df.apply(lambda·x:·integrate_f(x["a"],·x["b"],·x["N"]),·axis=1) | 598 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[5]:·</span><span·class="o">%</span><span·class="k">timeit</span>·df.apply(lambda·x:·integrate_f(x["a"],·x["b"],·x["N"]),·axis=1) |
599 | <span·class="go"> | 599 | <span·class="go">207·ms·+-·23·ms·per·loop·(mean·+-·std.·dev.·of·7·runs,·10·loops·each)</span> |
600 | </pre></div> | 600 | </pre></div> |
601 | </div> | 601 | </div> |
602 | <p>Let’s·take·a·look·and·see·where·the·time·is·spent·during·this·operation | 602 | <p>Let’s·take·a·look·and·see·where·the·time·is·spent·during·this·operation |
603 | using·the·<a·class="reference·external"·href="https://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-prun">prun·ipython·magic·function</a>:</p> | 603 | using·the·<a·class="reference·external"·href="https://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-prun">prun·ipython·magic·function</a>:</p> |
604 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·most·time·consuming·4·calls</span> | 604 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·most·time·consuming·4·calls</span> |
605 | <span·class="gp">In·[6]:·</span><span·class="o">%</span><span·class="k">prun</span>·-l·4·df.apply(lambda·x:·integrate_f(x["a"],·x["b"],·x["N"]),·axis=1)··#·noqa·E999 | 605 | <span·class="gp">In·[6]:·</span><span·class="o">%</span><span·class="k">prun</span>·-l·4·df.apply(lambda·x:·integrate_f(x["a"],·x["b"],·x["N"]),·axis=1)··#·noqa·E999 |
606 | <span·class="go">·········605946·function·calls·(605928·primitive·calls)·in· | 606 | <span·class="go">·········605946·function·calls·(605928·primitive·calls)·in·2.397·seconds</span> |
607 | <span·class="go">···Ordered·by:·internal·time</span> | 607 | <span·class="go">···Ordered·by:·internal·time</span> |
608 | <span·class="go">···List·reduced·from·159·to·4·due·to·restriction·<4></span> | 608 | <span·class="go">···List·reduced·from·159·to·4·due·to·restriction·<4></span> |
609 | <span·class="go">···ncalls··tottime··percall··cumtime··percall·filename:lineno(function)</span> | 609 | <span·class="go">···ncalls··tottime··percall··cumtime··percall·filename:lineno(function)</span> |
610 | <span·class="go">·····1000···· | 610 | <span·class="go">·····1000····1.253····0.001····2.094····0.002·<ipython-input-4-c2a74e076cf0>:1(integrate_f)</span> |
611 | <span·class="go">···552423····0. | 611 | <span·class="go">···552423····0.840····0.000····0.840····0.000·<ipython-input-3-c138bdd570e3>:1(f)</span> |
612 | <span·class="go">·····3000····0.0 | 612 | <span·class="go">·····3000····0.057····0.000····0.210····0.000·series.py:1095(__getitem__)</span> |
613 | <span·class="go">····· | 613 | <span·class="go">·····1001····0.036····0.000····0.061····0.000·apply.py:1247(series_generator)</span> |
614 | </pre></div> | 614 | </pre></div> |
615 | </div> | 615 | </div> |
616 | <p>By·far·the·majority·of·time·is·spend·inside·either·<code·class="docutils·literal·notranslate"><span·class="pre">integrate_f</span></code>·or·<code·class="docutils·literal·notranslate"><span·class="pre">f</span></code>, | 616 | <p>By·far·the·majority·of·time·is·spend·inside·either·<code·class="docutils·literal·notranslate"><span·class="pre">integrate_f</span></code>·or·<code·class="docutils·literal·notranslate"><span·class="pre">f</span></code>, |
617 | hence·we’ll·concentrate·our·efforts·cythonizing·these·two·functions.</p> | 617 | hence·we’ll·concentrate·our·efforts·cythonizing·these·two·functions.</p> |
618 | </section> | 618 | </section> |
619 | <section·id="plain-cython"> | 619 | <section·id="plain-cython"> |
620 | <span·id="enhancingperf-plain"></span><h3>Plain·Cython<a·class="headerlink"·href="#plain-cython"·title="Link·to·this·heading">#</a></h3> | 620 | <span·id="enhancingperf-plain"></span><h3>Plain·Cython<a·class="headerlink"·href="#plain-cython"·title="Link·to·this·heading">#</a></h3> |
Offset 634, 15 lines modified | Offset 634, 15 lines modified | ||
634 | <span·class="gp">···...:·</span>····for·i·in·range(N): | 634 | <span·class="gp">···...:·</span>····for·i·in·range(N): |
635 | <span·class="gp">···...:·</span>········s·+=·f_plain(a·+·i·*·dx) | 635 | <span·class="gp">···...:·</span>········s·+=·f_plain(a·+·i·*·dx) |
636 | <span·class="gp">···...:·</span>····return·s·*·dx | 636 | <span·class="gp">···...:·</span>····return·s·*·dx |
637 | <span·class="gp">···...:·</span> | 637 | <span·class="gp">···...:·</span> |
638 | </pre></div> | 638 | </pre></div> |
639 | </div> | 639 | </div> |
640 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[9]:·</span><span·class="o">%</span><span·class="k">timeit</span>·df.apply(lambda·x:·integrate_f_plain(x["a"],·x["b"],·x["N"]),·axis=1) | 640 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[9]:·</span><span·class="o">%</span><span·class="k">timeit</span>·df.apply(lambda·x:·integrate_f_plain(x["a"],·x["b"],·x["N"]),·axis=1) |
641 | <span·class="go"> | 641 | <span·class="go">210·ms·+-·62.5·ms·per·loop·(mean·+-·std.·dev.·of·7·runs,·10·loops·each)</span> |
642 | </pre></div> | 642 | </pre></div> |
643 | </div> | 643 | </div> |
644 | <p>This·has·improved·the·performance·compared·to·the·pure·Python·approach·by·one-third.</p> | 644 | <p>This·has·improved·the·performance·compared·to·the·pure·Python·approach·by·one-third.</p> |
645 | </section> | 645 | </section> |
646 | <section·id="declaring-c-types"> | 646 | <section·id="declaring-c-types"> |
647 | <span·id="enhancingperf-type"></span><h3>Declaring·C·types<a·class="headerlink"·href="#declaring-c-types"·title="Link·to·this·heading">#</a></h3> | 647 | <span·id="enhancingperf-type"></span><h3>Declaring·C·types<a·class="headerlink"·href="#declaring-c-types"·title="Link·to·this·heading">#</a></h3> |
648 | <p>We·can·annotate·the·function·variables·and·return·types·as·well·as·use·<code·class="docutils·literal·notranslate"><span·class="pre">cdef</span></code> | 648 | <p>We·can·annotate·the·function·variables·and·return·types·as·well·as·use·<code·class="docutils·literal·notranslate"><span·class="pre">cdef</span></code> |
Offset 658, 36 lines modified | Offset 658, 36 lines modified | ||
658 | <span·class="gp">···....:·</span>····for·i·in·range(N): | 658 | <span·class="gp">···....:·</span>····for·i·in·range(N): |
659 | <span·class="gp">···....:·</span>········s·+=·f_typed(a·+·i·*·dx) | 659 | <span·class="gp">···....:·</span>········s·+=·f_typed(a·+·i·*·dx) |
660 | <span·class="gp">···....:·</span>····return·s·*·dx | 660 | <span·class="gp">···....:·</span>····return·s·*·dx |
661 | <span·class="gp">···....:·</span> | 661 | <span·class="gp">···....:·</span> |
662 | </pre></div> | 662 | </pre></div> |
663 | </div> | 663 | </div> |
664 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[11]:·</span><span·class="o">%</span><span·class="k">timeit</span>·df.apply(lambda·x:·integrate_f_typed(x["a"],·x["b"],·x["N"]),·axis=1) | 664 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[11]:·</span><span·class="o">%</span><span·class="k">timeit</span>·df.apply(lambda·x:·integrate_f_typed(x["a"],·x["b"],·x["N"]),·axis=1) |
665 | <span·class="go"> | 665 | <span·class="go">93.6·ms·+-·3.41·ms·per·loop·(mean·+-·std.·dev.·of·7·runs,·10·loops·each)</span> |
666 | </pre></div> | 666 | </pre></div> |
667 | </div> | 667 | </div> |
668 | <p>Annotating·the·functions·with·C·types·yields·an·over·ten·times·performance·improvement·compared·to | 668 | <p>Annotating·the·functions·with·C·types·yields·an·over·ten·times·performance·improvement·compared·to |
669 | the·original·Python·implementation.</p> | 669 | the·original·Python·implementation.</p> |
670 | </section> | 670 | </section> |
671 | <section·id="using-ndarray"> | 671 | <section·id="using-ndarray"> |
672 | <span·id="enhancingperf-ndarray"></span><h3>Using·ndarray<a·class="headerlink"·href="#using-ndarray"·title="Link·to·this·heading">#</a></h3> | 672 | <span·id="enhancingperf-ndarray"></span><h3>Using·ndarray<a·class="headerlink"·href="#using-ndarray"·title="Link·to·this·heading">#</a></h3> |
673 | <p>When·re-profiling,·time·is·spent·creating·a·<a·class="reference·internal"·href="../reference/api/pandas.Series.html#pandas.Series"·title="pandas.Series"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">Series</span></code></a>·from·each·row,·and·calling·<code·class="docutils·literal·notranslate"><span·class="pre">__getitem__</span></code>·from·both | 673 | <p>When·re-profiling,·time·is·spent·creating·a·<a·class="reference·internal"·href="../reference/api/pandas.Series.html#pandas.Series"·title="pandas.Series"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">Series</span></code></a>·from·each·row,·and·calling·<code·class="docutils·literal·notranslate"><span·class="pre">__getitem__</span></code>·from·both |
674 | the·index·and·the·series·(three·times·for·each·row).·These·Python·function·calls·are·expensive·and | 674 | the·index·and·the·series·(three·times·for·each·row).·These·Python·function·calls·are·expensive·and |
675 | can·be·improved·by·passing·an·<code·class="docutils·literal·notranslate"><span·class="pre">np.ndarray</span></code>.</p> | 675 | can·be·improved·by·passing·an·<code·class="docutils·literal·notranslate"><span·class="pre">np.ndarray</span></code>.</p> |
676 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[12]:·</span><span·class="o">%</span><span·class="k">prun</span>·-l·4·df.apply(lambda·x:·integrate_f_typed(x["a"],·x["b"],·x["N"]),·axis=1) | 676 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[12]:·</span><span·class="o">%</span><span·class="k">prun</span>·-l·4·df.apply(lambda·x:·integrate_f_typed(x["a"],·x["b"],·x["N"]),·axis=1) |
677 | <span·class="go">·········52523·function·calls·(52505·primitive·calls)·in·0. | 677 | <span·class="go">·········52523·function·calls·(52505·primitive·calls)·in·0.418·seconds</span> |
678 | <span·class="go">···Ordered·by:·internal·time</span> | 678 | <span·class="go">···Ordered·by:·internal·time</span> |
679 | <span·class="go">···List·reduced·from·157·to·4·due·to·restriction·<4></span> | 679 | <span·class="go">···List·reduced·from·157·to·4·due·to·restriction·<4></span> |
680 | <span·class="go">···ncalls··tottime··percall··cumtime··percall·filename:lineno(function)</span> | 680 | <span·class="go">···ncalls··tottime··percall··cumtime··percall·filename:lineno(function)</span> |
681 | <span·class="go">·····3000····0.0 | 681 | <span·class="go">·····3000····0.062····0.000····0.292····0.000·series.py:1095(__getitem__)</span> |
682 | <span·class="go">·····3000····0.0 | 682 | <span·class="go">·····3000····0.053····0.000····0.134····0.000·series.py:1220(_get_value)</span> |
683 | <span·class="go">····16098····0.003····0.000····0.004····0.000·{built-in·method·builtins.isinstance}</span> | ||
684 | <span·class="go">·····3000····0.0 | 683 | <span·class="go">·····3000····0.045····0.000····0.056····0.000·base.py:3777(get_loc)</span> |
684 | <span·class="go">·····1001····0.038····0.000····0.068····0.000·apply.py:1247(series_generator)</span> | ||
685 | </pre></div> | 685 | </pre></div> |
686 | </div> | 686 | </div> |
687 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[13]:·</span><span·class="o">%%</span><span·class="k">cython</span> | 687 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[13]:·</span><span·class="o">%%</span><span·class="k">cython</span> |
688 | <span·class="gp">···....:·</span>cimport·numpy·as·np | 688 | <span·class="gp">···....:·</span>cimport·numpy·as·np |
689 | <span·class="gp">···....:·</span>import·numpy·as·np | 689 | <span·class="gp">···....:·</span>import·numpy·as·np |
690 | <span·class="gp">···....:·</span>cdef·double·f_typed(double·x)·except?·-2: | 690 | <span·class="gp">···....:·</span>cdef·double·f_typed(double·x)·except?·-2: |
691 | <span·class="gp">···....:·</span>····return·x·*·(x·-·1) | 691 | <span·class="gp">···....:·</span>····return·x·*·(x·-·1) |
Offset 722, 33 lines modified | Offset 722, 33 lines modified | ||
722 | </div> | 722 | </div> |
723 | <p>This·implementation·creates·an·array·of·zeros·and·inserts·the·result | 723 | <p>This·implementation·creates·an·array·of·zeros·and·inserts·the·result |
724 | of·<code·class="docutils·literal·notranslate"><span·class="pre">integrate_f_typed</span></code>·applied·over·each·row.·Looping·over·an·<code·class="docutils·literal·notranslate"><span·class="pre">ndarray</span></code>·is·faster | 724 | of·<code·class="docutils·literal·notranslate"><span·class="pre">integrate_f_typed</span></code>·applied·over·each·row.·Looping·over·an·<code·class="docutils·literal·notranslate"><span·class="pre">ndarray</span></code>·is·faster |
725 | in·Cython·than·looping·over·a·<a·class="reference·internal"·href="../reference/api/pandas.Series.html#pandas.Series"·title="pandas.Series"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">Series</span></code></a>·object.</p> | 725 | in·Cython·than·looping·over·a·<a·class="reference·internal"·href="../reference/api/pandas.Series.html#pandas.Series"·title="pandas.Series"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">Series</span></code></a>·object.</p> |
726 | <p>Since·<code·class="docutils·literal·notranslate"><span·class="pre">apply_integrate_f</span></code>·is·typed·to·accept·an·<code·class="docutils·literal·notranslate"><span·class="pre">np.ndarray</span></code>,·<a·class="reference·internal"·href="../reference/api/pandas.Series.to_numpy.html#pandas.Series.to_numpy"·title="pandas.Series.to_numpy"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">Series.to_numpy()</span></code></a> | 726 | <p>Since·<code·class="docutils·literal·notranslate"><span·class="pre">apply_integrate_f</span></code>·is·typed·to·accept·an·<code·class="docutils·literal·notranslate"><span·class="pre">np.ndarray</span></code>,·<a·class="reference·internal"·href="../reference/api/pandas.Series.to_numpy.html#pandas.Series.to_numpy"·title="pandas.Series.to_numpy"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">Series.to_numpy()</span></code></a> |
727 | calls·are·needed·to·utilize·this·function.</p> | 727 | calls·are·needed·to·utilize·this·function.</p> |
728 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[14]:·</span><span·class="o">%</span><span·class="k">timeit</span>·apply_integrate_f(df["a"].to_numpy(),·df["b"].to_numpy(),·df["N"].to_numpy()) | 728 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[14]:·</span><span·class="o">%</span><span·class="k">timeit</span>·apply_integrate_f(df["a"].to_numpy(),·df["b"].to_numpy(),·df["N"].to_numpy()) |
729 | <span·class="go"> | 729 | <span·class="go">4.63·ms·+-·1.81·ms·per·loop·(mean·+-·std.·dev.·of·7·runs,·100·loops·each)</span> |
730 | </pre></div> | 730 | </pre></div> |
731 | </div> | 731 | </div> |
732 | <p>Performance·has·improved·from·the·prior·implementation·by·almost·ten·times.</p> | 732 | <p>Performance·has·improved·from·the·prior·implementation·by·almost·ten·times.</p> |
733 | </section> | 733 | </section> |
734 | <section·id="disabling-compiler-directives"> | 734 | <section·id="disabling-compiler-directives"> |
735 | <span·id="enhancingperf-boundswrap"></span><h3>Disabling·compiler·directives<a·class="headerlink"·href="#disabling-compiler-directives"·title="Link·to·this·heading">#</a></h3> | 735 | <span·id="enhancingperf-boundswrap"></span><h3>Disabling·compiler·directives<a·class="headerlink"·href="#disabling-compiler-directives"·title="Link·to·this·heading">#</a></h3> |
736 | <p>The·majority·of·the·time·is·now·spent·in·<code·class="docutils·literal·notranslate"><span·class="pre">apply_integrate_f</span></code>.·Disabling·Cython’s·<code·class="docutils·literal·notranslate"><span·class="pre">boundscheck</span></code> | 736 | <p>The·majority·of·the·time·is·now·spent·in·<code·class="docutils·literal·notranslate"><span·class="pre">apply_integrate_f</span></code>.·Disabling·Cython’s·<code·class="docutils·literal·notranslate"><span·class="pre">boundscheck</span></code> |
737 | and·<code·class="docutils·literal·notranslate"><span·class="pre">wraparound</span></code>·checks·can·yield·more·performance.</p> | 737 | and·<code·class="docutils·literal·notranslate"><span·class="pre">wraparound</span></code>·checks·can·yield·more·performance.</p> |
738 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[15]:·</span><span·class="o">%</span><span·class="k">prun</span>·-l·4·apply_integrate_f(df["a"].to_numpy(),·df["b"].to_numpy(),·df["N"].to_numpy()) | 738 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[15]:·</span><span·class="o">%</span><span·class="k">prun</span>·-l·4·apply_integrate_f(df["a"].to_numpy(),·df["b"].to_numpy(),·df["N"].to_numpy()) |
739 | <span·class="go">·········78·function·calls·in·0.00 | 739 | <span·class="go">·········78·function·calls·in·0.003·seconds</span> |
740 | <span·class="go">···Ordered·by:·internal·time</span> | 740 | <span·class="go">···Ordered·by:·internal·time</span> |
741 | <span·class="go">···List·reduced·from·21·to·4·due·to·restriction·<4></span> | 741 | <span·class="go">···List·reduced·from·21·to·4·due·to·restriction·<4></span> |
742 | <span·class="go">···ncalls··tottime··percall··cumtime··percall·filename:lineno(function)</span> | 742 | <span·class="go">···ncalls··tottime··percall··cumtime··percall·filename:lineno(function)</span> |
743 | <span·class="go">········1····0.00 | 743 | <span·class="go">········1····0.002····0.002····0.002····0.002·<string>:1(<module>)</span> |
744 | <span·class="go">········1····0.000····0.000····0.000····0.000·{method·'disable'·of·'_lsprof.Profiler'·objects}</span> | 744 | <span·class="go">········1····0.000····0.000····0.000····0.000·{method·'disable'·of·'_lsprof.Profiler'·objects}</span> |
745 | <span·class="go">········1····0.000····0.000····0.00 | 745 | <span·class="go">········1····0.000····0.000····0.003····0.003·{built-in·method·builtins.exec}</span> |
746 | <span·class="go">········3····0.000····0.000····0.000····0.000·frame.py:4062(__getitem__)</span> | 746 | <span·class="go">········3····0.000····0.000····0.000····0.000·frame.py:4062(__getitem__)</span> |
747 | </pre></div> | 747 | </pre></div> |
748 | </div> | 748 | </div> |
749 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[16]:·</span><span·class="o">%%</span><span·class="k">cython</span> | 749 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[16]:·</span><span·class="o">%%</span><span·class="k">cython</span> |
750 | <span·class="gp">···....:·</span>cimport·cython | 750 | <span·class="gp">···....:·</span>cimport·cython |
751 | <span·class="gp">···....:·</span>cimport·numpy·as·np | 751 | <span·class="gp">···....:·</span>cimport·numpy·as·np |
752 | <span·class="gp">···....:·</span>import·numpy·as·np | 752 | <span·class="gp">···....:·</span>import·numpy·as·np |
Offset 782, 15 lines modified | Offset 782, 15 lines modified | ||
782 | <span·class="go">·················from·/build/reproducible-path/pandas-2.2.3+dfsg/buildtmp/.cache/ipython/cython/_cython_magic_883da8958ecc60be73b28b7124368f9c7cc2d174.c:1251:</span> | 782 | <span·class="go">·················from·/build/reproducible-path/pandas-2.2.3+dfsg/buildtmp/.cache/ipython/cython/_cython_magic_883da8958ecc60be73b28b7124368f9c7cc2d174.c:1251:</span> |
783 | <span·class="go">/usr/lib/x86_64-linux-gnu/python3-numpy/numpy/_core/include/numpy/npy_1_7_deprecated_api.h:17:2:·warning:·#warning·"Using·deprecated·NumPy·API,·disable·it·with·"·"#define·NPY_NO_DEPRECATED_API·NPY_1_7_API_VERSION"·[-Wcpp]</span> | 783 | <span·class="go">/usr/lib/x86_64-linux-gnu/python3-numpy/numpy/_core/include/numpy/npy_1_7_deprecated_api.h:17:2:·warning:·#warning·"Using·deprecated·NumPy·API,·disable·it·with·"·"#define·NPY_NO_DEPRECATED_API·NPY_1_7_API_VERSION"·[-Wcpp]</span> |
784 | <span·class="go">···17·|·#warning·"Using·deprecated·NumPy·API,·disable·it·with·"·\</span> | 784 | <span·class="go">···17·|·#warning·"Using·deprecated·NumPy·API,·disable·it·with·"·\</span> |
785 | <span·class="go">······|··^~~~~~~</span> | 785 | <span·class="go">······|··^~~~~~~</span> |
786 | </pre></div> | 786 | </pre></div> |
787 | </div> | 787 | </div> |
788 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[17]:·</span><span·class="o">%</span><span·class="k">timeit</span>·apply_integrate_f_wrap(df["a"].to_numpy(),·df["b"].to_numpy(),·df["N"].to_numpy()) | 788 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[17]:·</span><span·class="o">%</span><span·class="k">timeit</span>·apply_integrate_f_wrap(df["a"].to_numpy(),·df["b"].to_numpy(),·df["N"].to_numpy()) |
Max diff block lines reached; 9211/22776 bytes (40.44%) of diff not shown. |
Offset 110, 32 lines modified | Offset 110, 32 lines modified | ||
110 | ···...:·····dx·=·(b·-·a)·/·N | 110 | ···...:·····dx·=·(b·-·a)·/·N |
111 | ···...:·····for·i·in·range(N): | 111 | ···...:·····for·i·in·range(N): |
112 | ···...:·········s·+=·f(a·+·i·*·dx) | 112 | ···...:·········s·+=·f(a·+·i·*·dx) |
113 | ···...:·····return·s·*·dx | 113 | ···...:·····return·s·*·dx |
114 | ···...: | 114 | ···...: |
115 | We·achieve·our·result·by·using·_\x8D_\x8a_\x8t_\x8a_\x8F_\x8r_\x8a_\x8m_\x8e_\x8._\x8a_\x8p_\x8p_\x8l_\x8y_\x8(_\x8)·(row-wise): | 115 | We·achieve·our·result·by·using·_\x8D_\x8a_\x8t_\x8a_\x8F_\x8r_\x8a_\x8m_\x8e_\x8._\x8a_\x8p_\x8p_\x8l_\x8y_\x8(_\x8)·(row-wise): |
116 | In·[5]:·%timeit·df.apply(lambda·x:·integrate_f(x["a"],·x["b"],·x["N"]),·axis=1) | 116 | In·[5]:·%timeit·df.apply(lambda·x:·integrate_f(x["a"],·x["b"],·x["N"]),·axis=1) |
117 | 117 | 207·ms·+-·23·ms·per·loop·(mean·+-·std.·dev.·of·7·runs,·10·loops·each) | |
118 | Let’s·take·a·look·and·see·where·the·time·is·spent·during·this·operation·using | 118 | Let’s·take·a·look·and·see·where·the·time·is·spent·during·this·operation·using |
119 | the·_\x8p_\x8r_\x8u_\x8n_\x8·_\x8i_\x8p_\x8y_\x8t_\x8h_\x8o_\x8n_\x8·_\x8m_\x8a_\x8g_\x8i_\x8c_\x8·_\x8f_\x8u_\x8n_\x8c_\x8t_\x8i_\x8o_\x8n: | 119 | the·_\x8p_\x8r_\x8u_\x8n_\x8·_\x8i_\x8p_\x8y_\x8t_\x8h_\x8o_\x8n_\x8·_\x8m_\x8a_\x8g_\x8i_\x8c_\x8·_\x8f_\x8u_\x8n_\x8c_\x8t_\x8i_\x8o_\x8n: |
120 | #·most·time·consuming·4·calls | 120 | #·most·time·consuming·4·calls |
121 | In·[6]:·%prun·-l·4·df.apply(lambda·x:·integrate_f(x["a"],·x["b"],·x["N"]), | 121 | In·[6]:·%prun·-l·4·df.apply(lambda·x:·integrate_f(x["a"],·x["b"],·x["N"]), |
122 | axis=1)··#·noqa·E999 | 122 | axis=1)··#·noqa·E999 |
123 | ·········605946·function·calls·(605928·primitive·calls)·in· | 123 | ·········605946·function·calls·(605928·primitive·calls)·in·2.397·seconds |
124 | ···Ordered·by:·internal·time | 124 | ···Ordered·by:·internal·time |
125 | ···List·reduced·from·159·to·4·due·to·restriction·<4> | 125 | ···List·reduced·from·159·to·4·due·to·restriction·<4> |
126 | ···ncalls··tottime··percall··cumtime··percall·filename:lineno(function) | 126 | ···ncalls··tottime··percall··cumtime··percall·filename:lineno(function) |
127 | ·····1000···· | 127 | ·····1000····1.253····0.001····2.094····0.002·<ipython-input-4-c2a74e076cf0>:1 |
128 | (integrate_f) | 128 | (integrate_f) |
129 | ···552423····0. | 129 | ···552423····0.840····0.000····0.840····0.000·<ipython-input-3-c138bdd570e3>:1 |
130 | (f) | 130 | (f) |
131 | ·····3000····0.0 | 131 | ·····3000····0.057····0.000····0.210····0.000·series.py:1095(__getitem__) |
132 | ····· | 132 | ·····1001····0.036····0.000····0.061····0.000·apply.py:1247(series_generator) |
133 | By·far·the·majority·of·time·is·spend·inside·either·integrate_f·or·f,·hence | 133 | By·far·the·majority·of·time·is·spend·inside·either·integrate_f·or·f,·hence |
134 | we’ll·concentrate·our·efforts·cythonizing·these·two·functions. | 134 | we’ll·concentrate·our·efforts·cythonizing·these·two·functions. |
135 | *\x8**\x8**\x8**\x8*·P\x8Pl\x8la\x8ai\x8in\x8n·C\x8Cy\x8yt\x8th\x8ho\x8on\x8n_\x8#\x8#·*\x8**\x8**\x8**\x8* | 135 | *\x8**\x8**\x8**\x8*·P\x8Pl\x8la\x8ai\x8in\x8n·C\x8Cy\x8yt\x8th\x8ho\x8on\x8n_\x8#\x8#·*\x8**\x8**\x8**\x8* |
136 | First·we’re·going·to·need·to·import·the·Cython·magic·function·to·IPython: | 136 | First·we’re·going·to·need·to·import·the·Cython·magic·function·to·IPython: |
137 | In·[7]:·%load_ext·Cython | 137 | In·[7]:·%load_ext·Cython |
138 | Now,·let’s·simply·copy·our·functions·over·to·Cython: | 138 | Now,·let’s·simply·copy·our·functions·over·to·Cython: |
139 | In·[8]:·%%cython | 139 | In·[8]:·%%cython |
Offset 146, 15 lines modified | Offset 146, 15 lines modified | ||
146 | ···...:·····dx·=·(b·-·a)·/·N | 146 | ···...:·····dx·=·(b·-·a)·/·N |
147 | ···...:·····for·i·in·range(N): | 147 | ···...:·····for·i·in·range(N): |
148 | ···...:·········s·+=·f_plain(a·+·i·*·dx) | 148 | ···...:·········s·+=·f_plain(a·+·i·*·dx) |
149 | ···...:·····return·s·*·dx | 149 | ···...:·····return·s·*·dx |
150 | ···...: | 150 | ···...: |
151 | In·[9]:·%timeit·df.apply(lambda·x:·integrate_f_plain(x["a"],·x["b"],·x["N"]), | 151 | In·[9]:·%timeit·df.apply(lambda·x:·integrate_f_plain(x["a"],·x["b"],·x["N"]), |
152 | axis=1) | 152 | axis=1) |
153 | 153 | 210·ms·+-·62.5·ms·per·loop·(mean·+-·std.·dev.·of·7·runs,·10·loops·each) | |
154 | This·has·improved·the·performance·compared·to·the·pure·Python·approach·by·one- | 154 | This·has·improved·the·performance·compared·to·the·pure·Python·approach·by·one- |
155 | third. | 155 | third. |
156 | *\x8**\x8**\x8**\x8*·D\x8De\x8ec\x8cl\x8la\x8ar\x8ri\x8in\x8ng\x8g·C\x8C·t\x8ty\x8yp\x8pe\x8es\x8s_\x8#\x8#·*\x8**\x8**\x8**\x8* | 156 | *\x8**\x8**\x8**\x8*·D\x8De\x8ec\x8cl\x8la\x8ar\x8ri\x8in\x8ng\x8g·C\x8C·t\x8ty\x8yp\x8pe\x8es\x8s_\x8#\x8#·*\x8**\x8**\x8**\x8* |
157 | We·can·annotate·the·function·variables·and·return·types·as·well·as·use·cdef·and | 157 | We·can·annotate·the·function·variables·and·return·types·as·well·as·use·cdef·and |
158 | cpdef·to·improve·performance: | 158 | cpdef·to·improve·performance: |
159 | In·[10]:·%%cython | 159 | In·[10]:·%%cython |
160 | ···....:·cdef·double·f_typed(double·x)·except?·-2: | 160 | ···....:·cdef·double·f_typed(double·x)·except?·-2: |
Offset 166, 36 lines modified | Offset 166, 34 lines modified | ||
166 | ···....:·····dx·=·(b·-·a)·/·N | 166 | ···....:·····dx·=·(b·-·a)·/·N |
167 | ···....:·····for·i·in·range(N): | 167 | ···....:·····for·i·in·range(N): |
168 | ···....:·········s·+=·f_typed(a·+·i·*·dx) | 168 | ···....:·········s·+=·f_typed(a·+·i·*·dx) |
169 | ···....:·····return·s·*·dx | 169 | ···....:·····return·s·*·dx |
170 | ···....: | 170 | ···....: |
171 | In·[11]:·%timeit·df.apply(lambda·x:·integrate_f_typed(x["a"],·x["b"],·x["N"]), | 171 | In·[11]:·%timeit·df.apply(lambda·x:·integrate_f_typed(x["a"],·x["b"],·x["N"]), |
172 | axis=1) | 172 | axis=1) |
173 | 173 | 93.6·ms·+-·3.41·ms·per·loop·(mean·+-·std.·dev.·of·7·runs,·10·loops·each) | |
174 | Annotating·the·functions·with·C·types·yields·an·over·ten·times·performance | 174 | Annotating·the·functions·with·C·types·yields·an·over·ten·times·performance |
175 | improvement·compared·to·the·original·Python·implementation. | 175 | improvement·compared·to·the·original·Python·implementation. |
176 | *\x8**\x8**\x8**\x8*·U\x8Us\x8si\x8in\x8ng\x8g·n\x8nd\x8da\x8ar\x8rr\x8ra\x8ay\x8y_\x8#\x8#·*\x8**\x8**\x8**\x8* | 176 | *\x8**\x8**\x8**\x8*·U\x8Us\x8si\x8in\x8ng\x8g·n\x8nd\x8da\x8ar\x8rr\x8ra\x8ay\x8y_\x8#\x8#·*\x8**\x8**\x8**\x8* |
177 | When·re-profiling,·time·is·spent·creating·a·_\x8S_\x8e_\x8r_\x8i_\x8e_\x8s·from·each·row,·and·calling | 177 | When·re-profiling,·time·is·spent·creating·a·_\x8S_\x8e_\x8r_\x8i_\x8e_\x8s·from·each·row,·and·calling |
178 | __getitem__·from·both·the·index·and·the·series·(three·times·for·each·row). | 178 | __getitem__·from·both·the·index·and·the·series·(three·times·for·each·row). |
179 | These·Python·function·calls·are·expensive·and·can·be·improved·by·passing·an | 179 | These·Python·function·calls·are·expensive·and·can·be·improved·by·passing·an |
180 | np.ndarray. | 180 | np.ndarray. |
181 | In·[12]:·%prun·-l·4·df.apply(lambda·x:·integrate_f_typed(x["a"],·x["b"],·x | 181 | In·[12]:·%prun·-l·4·df.apply(lambda·x:·integrate_f_typed(x["a"],·x["b"],·x |
182 | ["N"]),·axis=1) | 182 | ["N"]),·axis=1) |
183 | ·········52523·function·calls·(52505·primitive·calls)·in·0. | 183 | ·········52523·function·calls·(52505·primitive·calls)·in·0.418·seconds |
184 | ···Ordered·by:·internal·time | 184 | ···Ordered·by:·internal·time |
185 | ···List·reduced·from·157·to·4·due·to·restriction·<4> | 185 | ···List·reduced·from·157·to·4·due·to·restriction·<4> |
186 | ···ncalls··tottime··percall··cumtime··percall·filename:lineno(function) | 186 | ···ncalls··tottime··percall··cumtime··percall·filename:lineno(function) |
187 | ·····3000····0.0 | 187 | ·····3000····0.062····0.000····0.292····0.000·series.py:1095(__getitem__) |
188 | ·····3000····0.0 | 188 | ·····3000····0.053····0.000····0.134····0.000·series.py:1220(_get_value) |
189 | ·····3000····0.045····0.000····0.056····0.000·base.py:3777(get_loc) | ||
190 | ·····1001····0.038····0.000····0.068····0.000·apply.py:1247(series_generator) | ||
189 | ····16098····0.003····0.000····0.004····0.000·{built-in·method | ||
190 | builtins.isinstance} | ||
191 | ·····3000····0.002····0.000····0.004····0.000·indexing.py:2765 | ||
192 | (check_dict_or_set_indexers) | ||
193 | In·[13]:·%%cython | 191 | In·[13]:·%%cython |
194 | ···....:·cimport·numpy·as·np | 192 | ···....:·cimport·numpy·as·np |
195 | ···....:·import·numpy·as·np | 193 | ···....:·import·numpy·as·np |
196 | ···....:·cdef·double·f_typed(double·x)·except?·-2: | 194 | ···....:·cdef·double·f_typed(double·x)·except?·-2: |
197 | ···....:·····return·x·*·(x·-·1) | 195 | ···....:·····return·x·*·(x·-·1) |
198 | ···....:·cpdef·double·integrate_f_typed(double·a,·double·b,·int·N): | 196 | ···....:·cpdef·double·integrate_f_typed(double·a,·double·b,·int·N): |
199 | ···....:·····cdef·int·i | 197 | ···....:·····cdef·int·i |
Offset 236, 31 lines modified | Offset 234, 31 lines modified | ||
236 | This·implementation·creates·an·array·of·zeros·and·inserts·the·result·of | 234 | This·implementation·creates·an·array·of·zeros·and·inserts·the·result·of |
237 | integrate_f_typed·applied·over·each·row.·Looping·over·an·ndarray·is·faster·in | 235 | integrate_f_typed·applied·over·each·row.·Looping·over·an·ndarray·is·faster·in |
238 | Cython·than·looping·over·a·_\x8S_\x8e_\x8r_\x8i_\x8e_\x8s·object. | 236 | Cython·than·looping·over·a·_\x8S_\x8e_\x8r_\x8i_\x8e_\x8s·object. |
239 | Since·apply_integrate_f·is·typed·to·accept·an·np.ndarray,·_\x8S_\x8e_\x8r_\x8i_\x8e_\x8s_\x8._\x8t_\x8o_\x8__\x8n_\x8u_\x8m_\x8p_\x8y_\x8(_\x8) | 237 | Since·apply_integrate_f·is·typed·to·accept·an·np.ndarray,·_\x8S_\x8e_\x8r_\x8i_\x8e_\x8s_\x8._\x8t_\x8o_\x8__\x8n_\x8u_\x8m_\x8p_\x8y_\x8(_\x8) |
240 | calls·are·needed·to·utilize·this·function. | 238 | calls·are·needed·to·utilize·this·function. |
241 | In·[14]:·%timeit·apply_integrate_f(df["a"].to_numpy(),·df["b"].to_numpy(),·df | 239 | In·[14]:·%timeit·apply_integrate_f(df["a"].to_numpy(),·df["b"].to_numpy(),·df |
242 | ["N"].to_numpy()) | 240 | ["N"].to_numpy()) |
243 | 241 | 4.63·ms·+-·1.81·ms·per·loop·(mean·+-·std.·dev.·of·7·runs,·100·loops·each) | |
244 | Performance·has·improved·from·the·prior·implementation·by·almost·ten·times. | 242 | Performance·has·improved·from·the·prior·implementation·by·almost·ten·times. |
245 | *\x8**\x8**\x8**\x8*·D\x8Di\x8is\x8sa\x8ab\x8bl\x8li\x8in\x8ng\x8g·c\x8co\x8om\x8mp\x8pi\x8il\x8le\x8er\x8r·d\x8di\x8ir\x8re\x8ec\x8ct\x8ti\x8iv\x8ve\x8es\x8s_\x8#\x8#·*\x8**\x8**\x8**\x8* | 243 | *\x8**\x8**\x8**\x8*·D\x8Di\x8is\x8sa\x8ab\x8bl\x8li\x8in\x8ng\x8g·c\x8co\x8om\x8mp\x8pi\x8il\x8le\x8er\x8r·d\x8di\x8ir\x8re\x8ec\x8ct\x8ti\x8iv\x8ve\x8es\x8s_\x8#\x8#·*\x8**\x8**\x8**\x8* |
246 | The·majority·of·the·time·is·now·spent·in·apply_integrate_f.·Disabling·Cython’s | 244 | The·majority·of·the·time·is·now·spent·in·apply_integrate_f.·Disabling·Cython’s |
247 | boundscheck·and·wraparound·checks·can·yield·more·performance. | 245 | boundscheck·and·wraparound·checks·can·yield·more·performance. |
248 | In·[15]:·%prun·-l·4·apply_integrate_f(df["a"].to_numpy(),·df["b"].to_numpy(), | 246 | In·[15]:·%prun·-l·4·apply_integrate_f(df["a"].to_numpy(),·df["b"].to_numpy(), |
249 | df["N"].to_numpy()) | 247 | df["N"].to_numpy()) |
250 | ·········78·function·calls·in·0.00 | 248 | ·········78·function·calls·in·0.003·seconds |
251 | ···Ordered·by:·internal·time | 249 | ···Ordered·by:·internal·time |
252 | ···List·reduced·from·21·to·4·due·to·restriction·<4> | 250 | ···List·reduced·from·21·to·4·due·to·restriction·<4> |
253 | ···ncalls··tottime··percall··cumtime··percall·filename:lineno(function) | 251 | ···ncalls··tottime··percall··cumtime··percall·filename:lineno(function) |
254 | ········1····0.00 | 252 | ········1····0.002····0.002····0.002····0.002·<string>:1(<module>) |
255 | ········1····0.000····0.000····0.000····0.000·{method·'disable'·of | 253 | ········1····0.000····0.000····0.000····0.000·{method·'disable'·of |
256 | '_lsprof.Profiler'·objects} | 254 | '_lsprof.Profiler'·objects} |
257 | ········1····0.000····0.000····0.00 | 255 | ········1····0.000····0.000····0.003····0.003·{built-in·method·builtins.exec} |
258 | ········3····0.000····0.000····0.000····0.000·frame.py:4062(__getitem__) | 256 | ········3····0.000····0.000····0.000····0.000·frame.py:4062(__getitem__) |
259 | In·[16]:·%%cython | 257 | In·[16]:·%%cython |
260 | ···....:·cimport·cython | 258 | ···....:·cimport·cython |
261 | ···....:·cimport·numpy·as·np | 259 | ···....:·cimport·numpy·as·np |
262 | ···....:·import·numpy·as·np | 260 | ···....:·import·numpy·as·np |
263 | ···....:·cdef·np.float64_t·f_typed(np.float64_t·x)·except?·-2: | 261 | ···....:·cdef·np.float64_t·f_typed(np.float64_t·x)·except?·-2: |
264 | ···....:·····return·x·*·(x·-·1) | 262 | ···....:·····return·x·*·(x·-·1) |
Offset 299, 15 lines modified | Offset 297, 15 lines modified | ||
299 | /usr/lib/x86_64-linux-gnu/python3-numpy/numpy/_core/include/numpy/ | 297 | /usr/lib/x86_64-linux-gnu/python3-numpy/numpy/_core/include/numpy/ |
300 | npy_1_7_deprecated_api.h:17:2:·warning:·#warning·"Using·deprecated·NumPy·API, | 298 | npy_1_7_deprecated_api.h:17:2:·warning:·#warning·"Using·deprecated·NumPy·API, |
301 | disable·it·with·"·"#define·NPY_NO_DEPRECATED_API·NPY_1_7_API_VERSION"·[-Wcpp] | 299 | disable·it·with·"·"#define·NPY_NO_DEPRECATED_API·NPY_1_7_API_VERSION"·[-Wcpp] |
302 | ···17·|·#warning·"Using·deprecated·NumPy·API,·disable·it·with·"·\ | 300 | ···17·|·#warning·"Using·deprecated·NumPy·API,·disable·it·with·"·\ |
303 | ······|··^~~~~~~ | 301 | ······|··^~~~~~~ |
304 | In·[17]:·%timeit·apply_integrate_f_wrap(df["a"].to_numpy(),·df["b"].to_numpy(), | 302 | In·[17]:·%timeit·apply_integrate_f_wrap(df["a"].to_numpy(),·df["b"].to_numpy(), |
305 | df["N"].to_numpy()) | 303 | df["N"].to_numpy()) |
Max diff block lines reached; 4025/11676 bytes (34.47%) of diff not shown. |
Offset 1086, 16 lines modified | Offset 1086, 16 lines modified | ||
1086 | <span·class="gp">···....:·</span><span·class="n">files</span>·<span·class="o">=</span>·<span·class="n">pathlib</span><span·class="o">.</span><span·class="n">Path</span><span·class="p">(</span><span·class="s2">"data/timeseries/"</span><span·class="p">)</span><span·class="o">.</span><span·class="n">glob</span><span·class="p">(</span><span·class="s2">"ts*.parquet"</span><span·class="p">)</span> | 1086 | <span·class="gp">···....:·</span><span·class="n">files</span>·<span·class="o">=</span>·<span·class="n">pathlib</span><span·class="o">.</span><span·class="n">Path</span><span·class="p">(</span><span·class="s2">"data/timeseries/"</span><span·class="p">)</span><span·class="o">.</span><span·class="n">glob</span><span·class="p">(</span><span·class="s2">"ts*.parquet"</span><span·class="p">)</span> |
1087 | <span·class="gp">···....:·</span><span·class="n">counts</span>·<span·class="o">=</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">Series</span><span·class="p">(</span><span·class="n">dtype</span><span·class="o">=</span><span·class="nb">int</span><span·class="p">)</span> | 1087 | <span·class="gp">···....:·</span><span·class="n">counts</span>·<span·class="o">=</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">Series</span><span·class="p">(</span><span·class="n">dtype</span><span·class="o">=</span><span·class="nb">int</span><span·class="p">)</span> |
1088 | <span·class="gp">···....:·</span><span·class="k">for</span>·<span·class="n">path</span>·<span·class="ow">in</span>·<span·class="n">files</span><span·class="p">:</span> | 1088 | <span·class="gp">···....:·</span><span·class="k">for</span>·<span·class="n">path</span>·<span·class="ow">in</span>·<span·class="n">files</span><span·class="p">:</span> |
1089 | <span·class="gp">···....:·</span>····<span·class="n">df</span>·<span·class="o">=</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">read_parquet</span><span·class="p">(</span><span·class="n">path</span><span·class="p">)</span> | 1089 | <span·class="gp">···....:·</span>····<span·class="n">df</span>·<span·class="o">=</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">read_parquet</span><span·class="p">(</span><span·class="n">path</span><span·class="p">)</span> |
1090 | <span·class="gp">···....:·</span>····<span·class="n">counts</span>·<span·class="o">=</span>·<span·class="n">counts</span><span·class="o">.</span><span·class="n">add</span><span·class="p">(</span><span·class="n">df</span><span·class="p">[</span><span·class="s2">"name"</span><span·class="p">]</span><span·class="o">.</span><span·class="n">value_counts</span><span·class="p">(),</span>·<span·class="n">fill_value</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">)</span> | 1090 | <span·class="gp">···....:·</span>····<span·class="n">counts</span>·<span·class="o">=</span>·<span·class="n">counts</span><span·class="o">.</span><span·class="n">add</span><span·class="p">(</span><span·class="n">df</span><span·class="p">[</span><span·class="s2">"name"</span><span·class="p">]</span><span·class="o">.</span><span·class="n">value_counts</span><span·class="p">(),</span>·<span·class="n">fill_value</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">)</span> |
1091 | <span·class="gp">···....:·</span><span·class="n">counts</span><span·class="o">.</span><span·class="n">astype</span><span·class="p">(</span><span·class="nb">int</span><span·class="p">)</span> | 1091 | <span·class="gp">···....:·</span><span·class="n">counts</span><span·class="o">.</span><span·class="n">astype</span><span·class="p">(</span><span·class="nb">int</span><span·class="p">)</span> |
1092 | <span·class="gp">···....:·</span> | 1092 | <span·class="gp">···....:·</span> |
1093 | <span·class="go">CPU·times:·user· | 1093 | <span·class="go">CPU·times:·user·0·ns,·sys:·1.41·ms,·total:·1.41·ms</span> |
1094 | <span·class="go">Wall·time:· | 1094 | <span·class="go">Wall·time:·9.42·ms</span> |
1095 | <span·class="gh">Out[32]:·</span><span·class="go">Series([],·dtype:·int64)</span> | 1095 | <span·class="gh">Out[32]:·</span><span·class="go">Series([],·dtype:·int64)</span> |
1096 | </pre></div> | 1096 | </pre></div> |
1097 | </div> | 1097 | </div> |
1098 | <p>Some·readers,·like·<a·class="reference·internal"·href="../reference/api/pandas.read_csv.html#pandas.read_csv"·title="pandas.read_csv"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">pandas.read_csv()</span></code></a>,·offer·parameters·to·control·the | 1098 | <p>Some·readers,·like·<a·class="reference·internal"·href="../reference/api/pandas.read_csv.html#pandas.read_csv"·title="pandas.read_csv"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">pandas.read_csv()</span></code></a>,·offer·parameters·to·control·the |
1099 | <code·class="docutils·literal·notranslate"><span·class="pre">chunksize</span></code>·when·reading·a·single·file.</p> | 1099 | <code·class="docutils·literal·notranslate"><span·class="pre">chunksize</span></code>·when·reading·a·single·file.</p> |
1100 | <p>Manually·chunking·is·an·OK·option·for·workflows·that·don’t | 1100 | <p>Manually·chunking·is·an·OK·option·for·workflows·that·don’t |
1101 | require·too·sophisticated·of·operations.·Some·operations,·like·<a·class="reference·internal"·href="../reference/api/pandas.DataFrame.groupby.html#pandas.DataFrame.groupby"·title="pandas.DataFrame.groupby"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">pandas.DataFrame.groupby()</span></code></a>,·are | 1101 | require·too·sophisticated·of·operations.·Some·operations,·like·<a·class="reference·internal"·href="../reference/api/pandas.DataFrame.groupby.html#pandas.DataFrame.groupby"·title="pandas.DataFrame.groupby"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">pandas.DataFrame.groupby()</span></code></a>,·are |
Offset 644, 16 lines modified | Offset 644, 16 lines modified | ||
644 | ···....:·files·=·pathlib.Path("data/timeseries/").glob("ts*.parquet") | 644 | ···....:·files·=·pathlib.Path("data/timeseries/").glob("ts*.parquet") |
645 | ···....:·counts·=·pd.Series(dtype=int) | 645 | ···....:·counts·=·pd.Series(dtype=int) |
646 | ···....:·for·path·in·files: | 646 | ···....:·for·path·in·files: |
647 | ···....:·····df·=·pd.read_parquet(path) | 647 | ···....:·····df·=·pd.read_parquet(path) |
648 | ···....:·····counts·=·counts.add(df["name"].value_counts(),·fill_value=0) | 648 | ···....:·····counts·=·counts.add(df["name"].value_counts(),·fill_value=0) |
649 | ···....:·counts.astype(int) | 649 | ···....:·counts.astype(int) |
650 | ···....: | 650 | ···....: |
651 | CPU·times:·user· | 651 | CPU·times:·user·0·ns,·sys:·1.41·ms,·total:·1.41·ms |
652 | Wall·time:· | 652 | Wall·time:·9.42·ms |
653 | Out[32]:·Series([],·dtype:·int64) | 653 | Out[32]:·Series([],·dtype:·int64) |
654 | Some·readers,·like·_\x8p_\x8a_\x8n_\x8d_\x8a_\x8s_\x8._\x8r_\x8e_\x8a_\x8d_\x8__\x8c_\x8s_\x8v_\x8(_\x8),·offer·parameters·to·control·the·chunksize | 654 | Some·readers,·like·_\x8p_\x8a_\x8n_\x8d_\x8a_\x8s_\x8._\x8r_\x8e_\x8a_\x8d_\x8__\x8c_\x8s_\x8v_\x8(_\x8),·offer·parameters·to·control·the·chunksize |
655 | when·reading·a·single·file. | 655 | when·reading·a·single·file. |
656 | Manually·chunking·is·an·OK·option·for·workflows·that·don’t·require·too | 656 | Manually·chunking·is·an·OK·option·for·workflows·that·don’t·require·too |
657 | sophisticated·of·operations.·Some·operations,·like·_\x8p_\x8a_\x8n_\x8d_\x8a_\x8s_\x8._\x8D_\x8a_\x8t_\x8a_\x8F_\x8r_\x8a_\x8m_\x8e_\x8._\x8g_\x8r_\x8o_\x8u_\x8p_\x8b_\x8y_\x8(_\x8), | 657 | sophisticated·of·operations.·Some·operations,·like·_\x8p_\x8a_\x8n_\x8d_\x8a_\x8s_\x8._\x8D_\x8a_\x8t_\x8a_\x8F_\x8r_\x8a_\x8m_\x8e_\x8._\x8g_\x8r_\x8o_\x8u_\x8p_\x8b_\x8y_\x8(_\x8), |
658 | are·much·harder·to·do·chunkwise.·In·these·cases,·you·may·be·better·switching·to | 658 | are·much·harder·to·do·chunkwise.·In·these·cases,·you·may·be·better·switching·to |
659 | a·different·library·that·implements·these·out-of-core·algorithms·for·you. | 659 | a·different·library·that·implements·these·out-of-core·algorithms·for·you. |
Offset 39, 18 lines modified | Offset 39, 18 lines modified | ||
39 | ············] | 39 | ············] |
40 | ········}, | 40 | ········}, |
41 | ········{ | 41 | ········{ |
42 | ············"cell_type":·"code", | 42 | ············"cell_type":·"code", |
43 | ············"execution_count":·1, | 43 | ············"execution_count":·1, |
44 | ············"metadata":·{ | 44 | ············"metadata":·{ |
45 | ················"execution":·{ | 45 | ················"execution":·{ |
46 | ····················"iopub.execute_input":·"202 | 46 | ····················"iopub.execute_input":·"2025-03-31T23:04:09.912062Z", |
47 | ····················"iopub.status.busy":·"202 | 47 | ····················"iopub.status.busy":·"2025-03-31T23:04:09.911488Z", |
48 | ····················"iopub.status.idle":·"202 | 48 | ····················"iopub.status.idle":·"2025-03-31T23:04:11.185862Z", |
49 | ····················"shell.execute_reply":·"202 | 49 | ····················"shell.execute_reply":·"2025-03-31T23:04:11.184875Z" |
50 | ················}, | 50 | ················}, |
51 | ················"nbsphinx":·"hidden" | 51 | ················"nbsphinx":·"hidden" |
52 | ············}, | 52 | ············}, |
53 | ············"outputs":·[], | 53 | ············"outputs":·[], |
54 | ············"source":·[ | 54 | ············"source":·[ |
55 | ················"import·matplotlib.pyplot\n", | 55 | ················"import·matplotlib.pyplot\n", |
56 | ················"#·We·have·this·here·to·trigger·matplotlib's·font·cache·stuff.\n", | 56 | ················"#·We·have·this·here·to·trigger·matplotlib's·font·cache·stuff.\n", |
Offset 77, 36 lines modified | Offset 77, 36 lines modified | ||
77 | ············] | 77 | ············] |
78 | ········}, | 78 | ········}, |
79 | ········{ | 79 | ········{ |
80 | ············"cell_type":·"code", | 80 | ············"cell_type":·"code", |
81 | ············"execution_count":·2, | 81 | ············"execution_count":·2, |
82 | ············"metadata":·{ | 82 | ············"metadata":·{ |
83 | ················"execution":·{ | 83 | ················"execution":·{ |
84 | ····················"iopub.execute_input":·"202 | 84 | ····················"iopub.execute_input":·"2025-03-31T23:04:11.190926Z", |
85 | ····················"iopub.status.busy":·"202 | 85 | ····················"iopub.status.busy":·"2025-03-31T23:04:11.190393Z", |
86 | ····················"iopub.status.idle":·"202 | 86 | ····················"iopub.status.idle":·"2025-03-31T23:04:12.122809Z", |
87 | ····················"shell.execute_reply":·"202 | 87 | ····················"shell.execute_reply":·"2025-03-31T23:04:12.121574Z" |
88 | ················} | 88 | ················} |
89 | ············}, | 89 | ············}, |
90 | ············"outputs":·[], | 90 | ············"outputs":·[], |
91 | ············"source":·[ | 91 | ············"source":·[ |
92 | ················"import·pandas·as·pd\n", | 92 | ················"import·pandas·as·pd\n", |
93 | ················"import·numpy·as·np\n", | 93 | ················"import·numpy·as·np\n", |
94 | ················"import·matplotlib·as·mpl\n" | 94 | ················"import·matplotlib·as·mpl\n" |
95 | ············] | 95 | ············] |
96 | ········}, | 96 | ········}, |
97 | ········{ | 97 | ········{ |
98 | ············"cell_type":·"code", | 98 | ············"cell_type":·"code", |
99 | ············"execution_count":·3, | 99 | ············"execution_count":·3, |
100 | ············"metadata":·{ | 100 | ············"metadata":·{ |
101 | ················"execution":·{ | 101 | ················"execution":·{ |
102 | ····················"iopub.execute_input":·"202 | 102 | ····················"iopub.execute_input":·"2025-03-31T23:04:12.127452Z", |
103 | ····················"iopub.status.busy":·"202 | 103 | ····················"iopub.status.busy":·"2025-03-31T23:04:12.126943Z", |
104 | ····················"iopub.status.idle":·"202 | 104 | ····················"iopub.status.idle":·"2025-03-31T23:04:12.293444Z", |
105 | ····················"shell.execute_reply":·"202 | 105 | ····················"shell.execute_reply":·"2025-03-31T23:04:12.292209Z" |
106 | ················}, | 106 | ················}, |
107 | ················"nbsphinx":·"hidden" | 107 | ················"nbsphinx":·"hidden" |
108 | ············}, | 108 | ············}, |
109 | ············"outputs":·[], | 109 | ············"outputs":·[], |
110 | ············"source":·[ | 110 | ············"source":·[ |
111 | ················"#·For·reproducibility·-·this·doesn't·respect·uuid_len·or·positionally-passed·uuid·but·the·places·here·that·use·that·coincidentally·bypass·this·anyway\n", | 111 | ················"#·For·reproducibility·-·this·doesn't·respect·uuid_len·or·positionally-passed·uuid·but·the·places·here·that·use·that·coincidentally·bypass·this·anyway\n", |
112 | ················"from·pandas.io.formats.style·import·Styler\n", | 112 | ················"from·pandas.io.formats.style·import·Styler\n", |
Offset 123, 18 lines modified | Offset 123, 18 lines modified | ||
123 | ············] | 123 | ············] |
124 | ········}, | 124 | ········}, |
125 | ········{ | 125 | ········{ |
126 | ············"cell_type":·"code", | 126 | ············"cell_type":·"code", |
127 | ············"execution_count":·4, | 127 | ············"execution_count":·4, |
128 | ············"metadata":·{ | 128 | ············"metadata":·{ |
129 | ················"execution":·{ | 129 | ················"execution":·{ |
130 | ····················"iopub.execute_input":·"202 | 130 | ····················"iopub.execute_input":·"2025-03-31T23:04:12.313231Z", |
131 | ····················"iopub.status.busy":·"202 | 131 | ····················"iopub.status.busy":·"2025-03-31T23:04:12.310495Z", |
132 | ····················"iopub.status.idle":·"202 | 132 | ····················"iopub.status.idle":·"2025-03-31T23:04:12.339427Z", |
133 | ····················"shell.execute_reply":·"202 | 133 | ····················"shell.execute_reply":·"2025-03-31T23:04:12.330939Z" |
134 | ················} | 134 | ················} |
135 | ············}, | 135 | ············}, |
136 | ············"outputs":·[ | 136 | ············"outputs":·[ |
137 | ················{ | 137 | ················{ |
138 | ····················"data":·{ | 138 | ····················"data":·{ |
139 | ························"text/html":·[ | 139 | ························"text/html":·[ |
140 | ····························"<style·type=\"text/css\">\n", | 140 | ····························"<style·type=\"text/css\">\n", |
Offset 193, 18 lines modified | Offset 193, 18 lines modified | ||
193 | ············] | 193 | ············] |
194 | ········}, | 194 | ········}, |
195 | ········{ | 195 | ········{ |
196 | ············"cell_type":·"code", | 196 | ············"cell_type":·"code", |
197 | ············"execution_count":·5, | 197 | ············"execution_count":·5, |
198 | ············"metadata":·{ | 198 | ············"metadata":·{ |
199 | ················"execution":·{ | 199 | ················"execution":·{ |
200 | ····················"iopub.execute_input":·"202 | 200 | ····················"iopub.execute_input":·"2025-03-31T23:04:12.422331Z", |
201 | ····················"iopub.status.busy":·"202 | 201 | ····················"iopub.status.busy":·"2025-03-31T23:04:12.421879Z", |
202 | ····················"iopub.status.idle":·"202 | 202 | ····················"iopub.status.idle":·"2025-03-31T23:04:12.457321Z", |
203 | ····················"shell.execute_reply":·"202 | 203 | ····················"shell.execute_reply":·"2025-03-31T23:04:12.456490Z" |
204 | ················} | 204 | ················} |
205 | ············}, | 205 | ············}, |
206 | ············"outputs":·[ | 206 | ············"outputs":·[ |
207 | ················{ | 207 | ················{ |
208 | ····················"data":·{ | 208 | ····················"data":·{ |
209 | ························"text/html":·[ | 209 | ························"text/html":·[ |
210 | ····························"<div>\n", | 210 | ····························"<div>\n", |
Offset 327, 18 lines modified | Offset 327, 18 lines modified | ||
327 | ············] | 327 | ············] |
328 | ········}, | 328 | ········}, |
329 | ········{ | 329 | ········{ |
330 | ············"cell_type":·"code", | 330 | ············"cell_type":·"code", |
331 | ············"execution_count":·6, | 331 | ············"execution_count":·6, |
332 | ············"metadata":·{ | 332 | ············"metadata":·{ |
333 | ················"execution":·{ | 333 | ················"execution":·{ |
334 | ····················"iopub.execute_input":·"202 | 334 | ····················"iopub.execute_input":·"2025-03-31T23:04:12.460513Z", |
335 | ····················"iopub.status.busy":·"202 | 335 | ····················"iopub.status.busy":·"2025-03-31T23:04:12.460139Z", |
336 | ····················"iopub.status.idle":·"202 | 336 | ····················"iopub.status.idle":·"2025-03-31T23:04:12.477419Z", |
337 | ····················"shell.execute_reply":·"202 | 337 | ····················"shell.execute_reply":·"2025-03-31T23:04:12.476602Z" |
338 | ················} | 338 | ················} |
339 | ············}, | 339 | ············}, |
340 | ············"outputs":·[ | 340 | ············"outputs":·[ |
341 | ················{ | 341 | ················{ |
342 | ····················"data":·{ | 342 | ····················"data":·{ |
343 | ························"text/html":·[ | 343 | ························"text/html":·[ |
344 | ····························"<style·type=\"text/css\">\n", | 344 | ····························"<style·type=\"text/css\">\n", |
Offset 448, 18 lines modified | Offset 448, 18 lines modified | ||
448 | ············] | 448 | ············] |
449 | ········}, | 449 | ········}, |
450 | ········{ | 450 | ········{ |
451 | ············"cell_type":·"code", | 451 | ············"cell_type":·"code", |
452 | ············"execution_count":·7, | 452 | ············"execution_count":·7, |
453 | ············"metadata":·{ | 453 | ············"metadata":·{ |
454 | ················"execution":·{ | 454 | ················"execution":·{ |
455 | ····················"iopub.execute_input":·"202 | 455 | ····················"iopub.execute_input":·"2025-03-31T23:04:12.480640Z", |
456 | ····················"iopub.status.busy":·"202 | 456 | ····················"iopub.status.busy":·"2025-03-31T23:04:12.480304Z", |
457 | ····················"iopub.status.idle":·"202 | 457 | ····················"iopub.status.idle":·"2025-03-31T23:04:12.492020Z", |
458 | ····················"shell.execute_reply":·"202 | 458 | ····················"shell.execute_reply":·"2025-03-31T23:04:12.491204Z" |
459 | ················} | 459 | ················} |
460 | ············}, | 460 | ············}, |
461 | ············"outputs":·[ | 461 | ············"outputs":·[ |
Max diff block lines reached; 83518/90470 bytes (92.32%) of diff not shown. |
Offset 1613, 20 lines modified | Offset 1613, 20 lines modified | ||
1613 | <span·class="gp">In·[94]:·</span><span·class="n">df1</span><span·class="p">,</span>·<span·class="n">df2</span><span·class="p">,</span>·<span·class="n">df3</span><span·class="p">,</span>·<span·class="n">df4</span>·<span·class="o">=</span>·<span·class="p">[</span><span·class="n">pd</span><span·class="o">.</span><span·class="n">DataFrame</span><span·class="p">(</span><span·class="n">np</span><span·class="o">.</span><span·class="n">random</span><span·class="o">.</span><span·class="n">randn</span><span·class="p">(</span><span·class="n">nrows</span><span·class="p">,</span>·<span·class="n">ncols</span><span·class="p">))</span> | 1613 | <span·class="gp">In·[94]:·</span><span·class="n">df1</span><span·class="p">,</span>·<span·class="n">df2</span><span·class="p">,</span>·<span·class="n">df3</span><span·class="p">,</span>·<span·class="n">df4</span>·<span·class="o">=</span>·<span·class="p">[</span><span·class="n">pd</span><span·class="o">.</span><span·class="n">DataFrame</span><span·class="p">(</span><span·class="n">np</span><span·class="o">.</span><span·class="n">random</span><span·class="o">.</span><span·class="n">randn</span><span·class="p">(</span><span·class="n">nrows</span><span·class="p">,</span>·<span·class="n">ncols</span><span·class="p">))</span> |
1614 | <span·class="gp">···....:·</span>······················<span·class="k">for</span>·<span·class="n">_</span>·<span·class="ow">in</span>·<span·class="nb">range</span><span·class="p">(</span><span·class="mi">4</span><span·class="p">)]</span> | 1614 | <span·class="gp">···....:·</span>······················<span·class="k">for</span>·<span·class="n">_</span>·<span·class="ow">in</span>·<span·class="nb">range</span><span·class="p">(</span><span·class="mi">4</span><span·class="p">)]</span> |
1615 | <span·class="gp">···....:·</span> | 1615 | <span·class="gp">···....:·</span> |
1616 | </pre></div> | 1616 | </pre></div> |
1617 | </div> | 1617 | </div> |
1618 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·eval·with·NumExpr·backend</span> | 1618 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·eval·with·NumExpr·backend</span> |
1619 | <span·class="gp">In·[95]:·</span><span·class="o">%</span><span·class="k">timeit</span>·pd.eval('df1·+·df2·+·df3·+·df4') | 1619 | <span·class="gp">In·[95]:·</span><span·class="o">%</span><span·class="k">timeit</span>·pd.eval('df1·+·df2·+·df3·+·df4') |
1620 | <span·class="go"> | 1620 | <span·class="go">14·ms·+-·319·us·per·loop·(mean·+-·std.·dev.·of·7·runs,·1·loop·each)</span> |
1621 | </pre></div> | 1621 | </pre></div> |
1622 | </div> | 1622 | </div> |
1623 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·pure·Python·evaluation</span> | 1623 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·pure·Python·evaluation</span> |
1624 | <span·class="gp">In·[96]:·</span><span·class="o">%</span><span·class="k">timeit</span>·df1·+·df2·+·df3·+·df4 | 1624 | <span·class="gp">In·[96]:·</span><span·class="o">%</span><span·class="k">timeit</span>·df1·+·df2·+·df3·+·df4 |
1625 | <span·class="go"> | 1625 | <span·class="go">19.8·ms·+-·2.39·ms·per·loop·(mean·+-·std.·dev.·of·7·runs,·1·loop·each)</span> |
1626 | </pre></div> | 1626 | </pre></div> |
1627 | </div> | 1627 | </div> |
1628 | <p>For·more·details,·see·the·<a·class="reference·internal"·href="../user_guide/enhancingperf.html#enhancingperf-eval"><span·class="std·std-ref">the·docs</span></a></p> | 1628 | <p>For·more·details,·see·the·<a·class="reference·internal"·href="../user_guide/enhancingperf.html#enhancingperf-eval"><span·class="std·std-ref">the·docs</span></a></p> |
1629 | </li> | 1629 | </li> |
1630 | <li><p>Similar·to·<code·class="docutils·literal·notranslate"><span·class="pre">pandas.eval</span></code>,·<a·class="reference·internal"·href="../reference/api/pandas.DataFrame.html#pandas.DataFrame"·title="pandas.DataFrame"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">DataFrame</span></code></a>·has·a·new | 1630 | <li><p>Similar·to·<code·class="docutils·literal·notranslate"><span·class="pre">pandas.eval</span></code>,·<a·class="reference·internal"·href="../reference/api/pandas.DataFrame.html#pandas.DataFrame"·title="pandas.DataFrame"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">DataFrame</span></code></a>·has·a·new |
1631 | <code·class="docutils·literal·notranslate"><span·class="pre">DataFrame.eval</span></code>·method·that·evaluates·an·expression·in·the·context·of | 1631 | <code·class="docutils·literal·notranslate"><span·class="pre">DataFrame.eval</span></code>·method·that·evaluates·an·expression·in·the·context·of |
1632 | the·<code·class="docutils·literal·notranslate"><span·class="pre">DataFrame</span></code>.·For·example,</p> | 1632 | the·<code·class="docutils·literal·notranslate"><span·class="pre">DataFrame</span></code>.·For·example,</p> |
Offset 965, 18 lines modified | Offset 965, 18 lines modified | ||
965 | ······In·[94]:·df1,·df2,·df3,·df4·=·[pd.DataFrame(np.random.randn(nrows, | 965 | ······In·[94]:·df1,·df2,·df3,·df4·=·[pd.DataFrame(np.random.randn(nrows, |
966 | ······ncols)) | 966 | ······ncols)) |
967 | ·········....:·······················for·_·in·range(4)] | 967 | ·········....:·······················for·_·in·range(4)] |
968 | ·········....: | 968 | ·········....: |
969 | ······#·eval·with·NumExpr·backend | 969 | ······#·eval·with·NumExpr·backend |
970 | ······In·[95]:·%timeit·pd.eval('df1·+·df2·+·df3·+·df4') | 970 | ······In·[95]:·%timeit·pd.eval('df1·+·df2·+·df3·+·df4') |
971 | ······ | 971 | ······14·ms·+-·319·us·per·loop·(mean·+-·std.·dev.·of·7·runs,·1·loop·each) |
972 | ······#·pure·Python·evaluation | 972 | ······#·pure·Python·evaluation |
973 | ······In·[96]:·%timeit·df1·+·df2·+·df3·+·df4 | 973 | ······In·[96]:·%timeit·df1·+·df2·+·df3·+·df4 |
974 | ······ | 974 | ······19.8·ms·+-·2.39·ms·per·loop·(mean·+-·std.·dev.·of·7·runs,·1·loop·each) |
975 | ······For·more·details,·see·the·_\x8t_\x8h_\x8e_\x8·_\x8d_\x8o_\x8c_\x8s | 975 | ······For·more·details,·see·the·_\x8t_\x8h_\x8e_\x8·_\x8d_\x8o_\x8c_\x8s |
976 | ····*·Similar·to·pandas.eval,·_\x8D_\x8a_\x8t_\x8a_\x8F_\x8r_\x8a_\x8m_\x8e·has·a·new·DataFrame.eval·method·that | 976 | ····*·Similar·to·pandas.eval,·_\x8D_\x8a_\x8t_\x8a_\x8F_\x8r_\x8a_\x8m_\x8e·has·a·new·DataFrame.eval·method·that |
977 | ······evaluates·an·expression·in·the·context·of·the·DataFrame.·For·example, | 977 | ······evaluates·an·expression·in·the·context·of·the·DataFrame.·For·example, |
978 | ······In·[97]:·df·=·pd.DataFrame(np.random.randn(10,·2),·columns=['a',·'b']) | 978 | ······In·[97]:·df·=·pd.DataFrame(np.random.randn(10,·2),·columns=['a',·'b']) |
979 | ······In·[98]:·df.eval('a·+·b') | 979 | ······In·[98]:·df.eval('a·+·b') |
980 | ······Out[98]: | 980 | ······Out[98]: |
Offset 1458, 18 lines modified | Offset 1458, 18 lines modified | ||
1458 | </div> | 1458 | </div> |
1459 | <div·class="admonition·note"> | 1459 | <div·class="admonition·note"> |
1460 | <p·class="admonition-title">Note</p> | 1460 | <p·class="admonition-title">Note</p> |
1461 | <p>If·you·want·to·perform·calculations·based·on·today’s·date,·use·<code·class="docutils·literal·notranslate"><span·class="pre">Timestamp.now()</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">pandas.tseries.offsets</span></code>.</p> | 1461 | <p>If·you·want·to·perform·calculations·based·on·today’s·date,·use·<code·class="docutils·literal·notranslate"><span·class="pre">Timestamp.now()</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">pandas.tseries.offsets</span></code>.</p> |
1462 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[65]:·</span><span·class="kn">import</span>·<span·class="nn">pandas.tseries.offsets</span>·<span·class="k">as</span>·<span·class="nn">offsets</span> | 1462 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[65]:·</span><span·class="kn">import</span>·<span·class="nn">pandas.tseries.offsets</span>·<span·class="k">as</span>·<span·class="nn">offsets</span> |
1463 | <span·class="gp">In·[66]:·</span><span·class="n">pd</span><span·class="o">.</span><span·class="n">Timestamp</span><span·class="o">.</span><span·class="n">now</span><span·class="p">()</span> | 1463 | <span·class="gp">In·[66]:·</span><span·class="n">pd</span><span·class="o">.</span><span·class="n">Timestamp</span><span·class="o">.</span><span·class="n">now</span><span·class="p">()</span> |
1464 | <span·class="gh">Out[66]:·</span><span·class="go">Timestamp('202 | 1464 | <span·class="gh">Out[66]:·</span><span·class="go">Timestamp('2025-04-01·12:56:41.569231')</span> |
1465 | <span·class="gp">In·[67]:·</span><span·class="n">pd</span><span·class="o">.</span><span·class="n">Timestamp</span><span·class="o">.</span><span·class="n">now</span><span·class="p">()</span>·<span·class="o">+</span>·<span·class="n">offsets</span><span·class="o">.</span><span·class="n">DateOffset</span><span·class="p">(</span><span·class="n">years</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">)</span> | 1465 | <span·class="gp">In·[67]:·</span><span·class="n">pd</span><span·class="o">.</span><span·class="n">Timestamp</span><span·class="o">.</span><span·class="n">now</span><span·class="p">()</span>·<span·class="o">+</span>·<span·class="n">offsets</span><span·class="o">.</span><span·class="n">DateOffset</span><span·class="p">(</span><span·class="n">years</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">)</span> |
1466 | <span·class="gh">Out[67]:·</span><span·class="go">Timestamp('202 | 1466 | <span·class="gh">Out[67]:·</span><span·class="go">Timestamp('2026-04-01·12:56:41.572065')</span> |
1467 | </pre></div> | 1467 | </pre></div> |
1468 | </div> | 1468 | </div> |
1469 | </div> | 1469 | </div> |
1470 | </section> | 1470 | </section> |
1471 | </section> | 1471 | </section> |
1472 | <section·id="changes-to-index-comparisons"> | 1472 | <section·id="changes-to-index-comparisons"> |
1473 | <h3>Changes·to·Index·comparisons<a·class="headerlink"·href="#changes-to-index-comparisons"·title="Link·to·this·heading">#</a></h3> | 1473 | <h3>Changes·to·Index·comparisons<a·class="headerlink"·href="#changes-to-index-comparisons"·title="Link·to·this·heading">#</a></h3> |
Offset 814, 18 lines modified | Offset 814, 18 lines modified | ||
814 | freq=None) | 814 | freq=None) |
815 | Note | 815 | Note |
816 | If·you·want·to·perform·calculations·based·on·today’s·date,·use·Timestamp.now() | 816 | If·you·want·to·perform·calculations·based·on·today’s·date,·use·Timestamp.now() |
817 | and·pandas.tseries.offsets. | 817 | and·pandas.tseries.offsets. |
818 | In·[65]:·import·pandas.tseries.offsets·as·offsets | 818 | In·[65]:·import·pandas.tseries.offsets·as·offsets |
819 | In·[66]:·pd.Timestamp.now() | 819 | In·[66]:·pd.Timestamp.now() |
820 | Out[66]:·Timestamp('202 | 820 | Out[66]:·Timestamp('2025-04-01·12:56:41.569231') |
821 | In·[67]:·pd.Timestamp.now()·+·offsets.DateOffset(years=1) | 821 | In·[67]:·pd.Timestamp.now()·+·offsets.DateOffset(years=1) |
822 | Out[67]:·Timestamp('202 | 822 | Out[67]:·Timestamp('2026-04-01·12:56:41.572065') |
823 | *\x8**\x8**\x8**\x8*·C\x8Ch\x8ha\x8an\x8ng\x8ge\x8es\x8s·t\x8to\x8o·I\x8In\x8nd\x8de\x8ex\x8x·c\x8co\x8om\x8mp\x8pa\x8ar\x8ri\x8is\x8so\x8on\x8ns\x8s_\x8#\x8#·*\x8**\x8**\x8**\x8* | 823 | *\x8**\x8**\x8**\x8*·C\x8Ch\x8ha\x8an\x8ng\x8ge\x8es\x8s·t\x8to\x8o·I\x8In\x8nd\x8de\x8ex\x8x·c\x8co\x8om\x8mp\x8pa\x8ar\x8ri\x8is\x8so\x8on\x8ns\x8s_\x8#\x8#·*\x8**\x8**\x8**\x8* |
824 | Operator·equal·on·Index·should·behavior·similarly·to·Series·(_\x8G_\x8H_\x8·_\x89_\x89_\x84_\x87,·_\x8G_\x8H_\x8·_\x81_\x80_\x86_\x83_\x87) | 824 | Operator·equal·on·Index·should·behavior·similarly·to·Series·(_\x8G_\x8H_\x8·_\x89_\x89_\x84_\x87,·_\x8G_\x8H_\x8·_\x81_\x80_\x86_\x83_\x87) |
825 | Starting·in·v0.17.0,·comparing·Index·objects·of·different·lengths·will·raise·a | 825 | Starting·in·v0.17.0,·comparing·Index·objects·of·different·lengths·will·raise·a |
826 | ValueError.·This·is·to·be·consistent·with·the·behavior·of·Series. | 826 | ValueError.·This·is·to·be·consistent·with·the·behavior·of·Series. |
827 | Previous·behavior: | 827 | Previous·behavior: |
828 | In·[2]:·pd.Index([1,·2,·3])·==·pd.Index([1,·4,·5]) | 828 | In·[2]:·pd.Index([1,·2,·3])·==·pd.Index([1,·4,·5]) |
829 | Out[2]:·array([·True,·False,·False],·dtype=bool) | 829 | Out[2]:·array([·True,·False,·False],·dtype=bool) |
Offset 835, 14 lines modified | Offset 835, 16 lines modified | ||
835 | <span·class="gh">Out[12]:·</span> | 835 | <span·class="gh">Out[12]:·</span> |
836 | <span·class="go">············group··val</span> | 836 | <span·class="go">············group··val</span> |
837 | <span·class="go">date··················</span> | 837 | <span·class="go">date··················</span> |
838 | <span·class="go">2016-01-03······1····5</span> | 838 | <span·class="go">2016-01-03······1····5</span> |
839 | <span·class="go">2016-01-10······1····6</span> | 839 | <span·class="go">2016-01-10······1····6</span> |
840 | <span·class="go">2016-01-17······2····7</span> | 840 | <span·class="go">2016-01-17······2····7</span> |
841 | <span·class="go">2016-01-24······2····8</span> | 841 | <span·class="go">2016-01-24······2····8</span> |
842 | <span·class="go">[4·rows·x·2·columns]</span> | ||
842 | </pre></div> | 843 | </pre></div> |
843 | </div> | 844 | </div> |
844 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="n">In</span><span·class="p">[</span><span·class="mi">1</span><span·class="p">]:</span>·<span·class="n">df</span><span·class="o">.</span><span·class="n">groupby</span><span·class="p">(</span><span·class="s2">"group"</span><span·class="p">)</span><span·class="o">.</span><span·class="n">apply</span><span·class="p">(</span><span·class="k">lambda</span>·<span·class="n">x</span><span·class="p">:</span>·<span·class="n">x</span><span·class="o">.</span><span·class="n">resample</span><span·class="p">(</span><span·class="s2">"1D"</span><span·class="p">)</span><span·class="o">.</span><span·class="n">ffill</span><span·class="p">())</span> | 845 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="n">In</span><span·class="p">[</span><span·class="mi">1</span><span·class="p">]:</span>·<span·class="n">df</span><span·class="o">.</span><span·class="n">groupby</span><span·class="p">(</span><span·class="s2">"group"</span><span·class="p">)</span><span·class="o">.</span><span·class="n">apply</span><span·class="p">(</span><span·class="k">lambda</span>·<span·class="n">x</span><span·class="p">:</span>·<span·class="n">x</span><span·class="o">.</span><span·class="n">resample</span><span·class="p">(</span><span·class="s2">"1D"</span><span·class="p">)</span><span·class="o">.</span><span·class="n">ffill</span><span·class="p">())</span> |
845 | <span·class="n">Out</span><span·class="p">[</span><span·class="mi">1</span><span·class="p">]:</span> | 846 | <span·class="n">Out</span><span·class="p">[</span><span·class="mi">1</span><span·class="p">]:</span> |
846 | ··················<span·class="n">group</span>··<span·class="n">val</span> | 847 | ··················<span·class="n">group</span>··<span·class="n">val</span> |
847 | <span·class="n">group</span>·<span·class="n">date</span> | 848 | <span·class="n">group</span>·<span·class="n">date</span> |
848 | <span·class="mi">1</span>·····<span·class="mi">2016</span><span·class="o">-</span><span·class="mi">01</span><span·class="o">-</span><span·class="mi">03</span>······<span·class="mi">1</span>····<span·class="mi">5</span> | 849 | <span·class="mi">1</span>·····<span·class="mi">2016</span><span·class="o">-</span><span·class="mi">01</span><span·class="o">-</span><span·class="mi">03</span>······<span·class="mi">1</span>····<span·class="mi">5</span> |
Offset 905, 48 lines modified | Offset 907, 54 lines modified | ||
905 | <span·class="gp">In·[14]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">where</span><span·class="p">(</span><span·class="k">lambda</span>·<span·class="n">x</span><span·class="p">:</span>·<span·class="n">x</span>·<span·class="o">></span>·<span·class="mi">4</span><span·class="p">,</span>·<span·class="k">lambda</span>·<span·class="n">x</span><span·class="p">:</span>·<span·class="n">x</span>·<span·class="o">+</span>·<span·class="mi">10</span><span·class="p">)</span> | 907 | <span·class="gp">In·[14]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">where</span><span·class="p">(</span><span·class="k">lambda</span>·<span·class="n">x</span><span·class="p">:</span>·<span·class="n">x</span>·<span·class="o">></span>·<span·class="mi">4</span><span·class="p">,</span>·<span·class="k">lambda</span>·<span·class="n">x</span><span·class="p">:</span>·<span·class="n">x</span>·<span·class="o">+</span>·<span·class="mi">10</span><span·class="p">)</span> |
906 | <span·class="gh">Out[14]:·</span> | 908 | <span·class="gh">Out[14]:·</span> |
907 | <span·class="go">····A···B··C</span> | 909 | <span·class="go">····A···B··C</span> |
908 | <span·class="go">0··11··14··7</span> | 910 | <span·class="go">0··11··14··7</span> |
909 | <span·class="go">1··12···5··8</span> | 911 | <span·class="go">1··12···5··8</span> |
910 | <span·class="go">2··13···6··9</span> | 912 | <span·class="go">2··13···6··9</span> |
913 | <span·class="go">[3·rows·x·3·columns]</span> | ||
911 | </pre></div> | 914 | </pre></div> |
912 | </div> | 915 | </div> |
913 | </section> | 916 | </section> |
914 | <section·id="methods-loc-iloc-ix"> | 917 | <section·id="methods-loc-iloc-ix"> |
915 | <h4>Methods·<code·class="docutils·literal·notranslate"><span·class="pre">.loc[]</span></code>,·<code·class="docutils·literal·notranslate"><span·class="pre">.iloc[]</span></code>,·<code·class="docutils·literal·notranslate"><span·class="pre">.ix[]</span></code><a·class="headerlink"·href="#methods-loc-iloc-ix"·title="Link·to·this·heading">#</a></h4> | 918 | <h4>Methods·<code·class="docutils·literal·notranslate"><span·class="pre">.loc[]</span></code>,·<code·class="docutils·literal·notranslate"><span·class="pre">.iloc[]</span></code>,·<code·class="docutils·literal·notranslate"><span·class="pre">.ix[]</span></code><a·class="headerlink"·href="#methods-loc-iloc-ix"·title="Link·to·this·heading">#</a></h4> |
916 | <p>These·can·accept·a·callable,·and·a·tuple·of·callable·as·a·slicer.·The·callable | 919 | <p>These·can·accept·a·callable,·and·a·tuple·of·callable·as·a·slicer.·The·callable |
917 | can·return·a·valid·boolean·indexer·or·anything·which·is·valid·for·these·indexer’s·input.</p> | 920 | can·return·a·valid·boolean·indexer·or·anything·which·is·valid·for·these·indexer’s·input.</p> |
918 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·callable·returns·bool·indexer</span> | 921 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·callable·returns·bool·indexer</span> |
919 | <span·class="gp">In·[15]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">loc</span><span·class="p">[</span><span·class="k">lambda</span>·<span·class="n">x</span><span·class="p">:</span>·<span·class="n">x</span><span·class="o">.</span><span·class="n">A</span>·<span·class="o">>=</span>·<span·class="mi">2</span><span·class="p">,</span>·<span·class="k">lambda</span>·<span·class="n">x</span><span·class="p">:</span>·<span·class="n">x</span><span·class="o">.</span><span·class="n">sum</span><span·class="p">()</span>·<span·class="o">></span>·<span·class="mi">10</span><span·class="p">]</span> | 922 | <span·class="gp">In·[15]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">loc</span><span·class="p">[</span><span·class="k">lambda</span>·<span·class="n">x</span><span·class="p">:</span>·<span·class="n">x</span><span·class="o">.</span><span·class="n">A</span>·<span·class="o">>=</span>·<span·class="mi">2</span><span·class="p">,</span>·<span·class="k">lambda</span>·<span·class="n">x</span><span·class="p">:</span>·<span·class="n">x</span><span·class="o">.</span><span·class="n">sum</span><span·class="p">()</span>·<span·class="o">></span>·<span·class="mi">10</span><span·class="p">]</span> |
920 | <span·class="gh">Out[15]:·</span> | 923 | <span·class="gh">Out[15]:·</span> |
921 | <span·class="go">···B··C</span> | 924 | <span·class="go">···B··C</span> |
922 | <span·class="go">1··5··8</span> | 925 | <span·class="go">1··5··8</span> |
923 | <span·class="go">2··6··9</span> | 926 | <span·class="go">2··6··9</span> |
927 | <span·class="go">[2·rows·x·2·columns]</span> | ||
924 | <span·class="go">#·callable·returns·list·of·labels</span> | 928 | <span·class="go">#·callable·returns·list·of·labels</span> |
925 | <span·class="gp">In·[16]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">loc</span><span·class="p">[</span><span·class="k">lambda</span>·<span·class="n">x</span><span·class="p">:</span>·<span·class="p">[</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">2</span><span·class="p">],</span>·<span·class="k">lambda</span>·<span·class="n">x</span><span·class="p">:</span>·<span·class="p">[</span><span·class="s2">"A"</span><span·class="p">,</span>·<span·class="s2">"B"</span><span·class="p">]]</span> | 929 | <span·class="gp">In·[16]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">loc</span><span·class="p">[</span><span·class="k">lambda</span>·<span·class="n">x</span><span·class="p">:</span>·<span·class="p">[</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">2</span><span·class="p">],</span>·<span·class="k">lambda</span>·<span·class="n">x</span><span·class="p">:</span>·<span·class="p">[</span><span·class="s2">"A"</span><span·class="p">,</span>·<span·class="s2">"B"</span><span·class="p">]]</span> |
926 | <span·class="gh">Out[16]:·</span> | 930 | <span·class="gh">Out[16]:·</span> |
927 | <span·class="go">···A··B</span> | 931 | <span·class="go">···A··B</span> |
928 | <span·class="go">1··2··5</span> | 932 | <span·class="go">1··2··5</span> |
929 | <span·class="go">2··3··6</span> | 933 | <span·class="go">2··3··6</span> |
934 | <span·class="go">[2·rows·x·2·columns]</span> | ||
930 | </pre></div> | 935 | </pre></div> |
931 | </div> | 936 | </div> |
932 | </section> | 937 | </section> |
933 | <section·id="indexing-with"> | 938 | <section·id="indexing-with"> |
934 | <h4>Indexing·with·<code·class="docutils·literal·notranslate"><span·class="pre">[]</span></code><a·class="headerlink"·href="#indexing-with"·title="Link·to·this·heading">#</a></h4> | 939 | <h4>Indexing·with·<code·class="docutils·literal·notranslate"><span·class="pre">[]</span></code><a·class="headerlink"·href="#indexing-with"·title="Link·to·this·heading">#</a></h4> |
935 | <p>Finally,·you·can·use·a·callable·in·<code·class="docutils·literal·notranslate"><span·class="pre">[]</span></code>·indexing·of·Series,·DataFrame·and·Panel. | 940 | <p>Finally,·you·can·use·a·callable·in·<code·class="docutils·literal·notranslate"><span·class="pre">[]</span></code>·indexing·of·Series,·DataFrame·and·Panel. |
936 | The·callable·must·return·a·valid·input·for·<code·class="docutils·literal·notranslate"><span·class="pre">[]</span></code>·indexing·depending·on·its | 941 | The·callable·must·return·a·valid·input·for·<code·class="docutils·literal·notranslate"><span·class="pre">[]</span></code>·indexing·depending·on·its |
937 | class·and·index·type.</p> | 942 | class·and·index·type.</p> |
938 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[17]:·</span><span·class="n">df</span><span·class="p">[</span><span·class="k">lambda</span>·<span·class="n">x</span><span·class="p">:</span>·<span·class="s2">"A"</span><span·class="p">]</span> | 943 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[17]:·</span><span·class="n">df</span><span·class="p">[</span><span·class="k">lambda</span>·<span·class="n">x</span><span·class="p">:</span>·<span·class="s2">"A"</span><span·class="p">]</span> |
939 | <span·class="gh">Out[17]:·</span> | 944 | <span·class="gh">Out[17]:·</span> |
940 | <span·class="go">0····1</span> | 945 | <span·class="go">0····1</span> |
941 | <span·class="go">1····2</span> | 946 | <span·class="go">1····2</span> |
942 | <span·class="go">2····3</span> | 947 | <span·class="go">2····3</span> |
943 | <span·class="go">Name:·A,·dtype:·int64</span> | 948 | <span·class="go">Name:·A,·Length:·3,·dtype:·int64</span> |
944 | </pre></div> | 949 | </pre></div> |
945 | </div> | 950 | </div> |
946 | <p>Using·these·methods·/·indexers,·you·can·chain·data·selection·operations | 951 | <p>Using·these·methods·/·indexers,·you·can·chain·data·selection·operations |
947 | without·using·temporary·variable.</p> | 952 | without·using·temporary·variable.</p> |
948 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[18]:·</span><span·class="n">bb</span>·<span·class="o">=</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">read_csv</span><span·class="p">(</span><span·class="s2">"data/baseball.csv"</span><span·class="p">,</span>·<span·class="n">index_col</span><span·class="o">=</span><span·class="s2">"id"</span><span·class="p">)</span> | 953 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[18]:·</span><span·class="n">bb</span>·<span·class="o">=</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">read_csv</span><span·class="p">(</span><span·class="s2">"data/baseball.csv"</span><span·class="p">,</span>·<span·class="n">index_col</span><span·class="o">=</span><span·class="s2">"id"</span><span·class="p">)</span> |
949 | <span·class="gp">In·[19]:·</span><span·class="p">(</span><span·class="n">bb</span><span·class="o">.</span><span·class="n">groupby</span><span·class="p">([</span><span·class="s2">"year"</span><span·class="p">,</span>·<span·class="s2">"team"</span><span·class="p">])</span><span·class="o">.</span><span·class="n">sum</span><span·class="p">(</span><span·class="n">numeric_only</span><span·class="o">=</span><span·class="kc">True</span><span·class="p">)</span><span·class="o">.</span><span·class="n">loc</span><span·class="p">[</span><span·class="k">lambda</span>·<span·class="n">df</span><span·class="p">:</span>·<span·class="n">df</span><span·class="o">.</span><span·class="n">r</span>·<span·class="o">></span>·<span·class="mi">100</span><span·class="p">])</span> | 954 | <span·class="gp">In·[19]:·</span><span·class="p">(</span><span·class="n">bb</span><span·class="o">.</span><span·class="n">groupby</span><span·class="p">([</span><span·class="s2">"year"</span><span·class="p">,</span>·<span·class="s2">"team"</span><span·class="p">])</span><span·class="o">.</span><span·class="n">sum</span><span·class="p">(</span><span·class="n">numeric_only</span><span·class="o">=</span><span·class="kc">True</span><span·class="p">)</span><span·class="o">.</span><span·class="n">loc</span><span·class="p">[</span><span·class="k">lambda</span>·<span·class="n">df</span><span·class="p">:</span>·<span·class="n">df</span><span·class="o">.</span><span·class="n">r</span>·<span·class="o">></span>·<span·class="mi">100</span><span·class="p">])</span> |
Offset 1050, 30 lines modified | Offset 1058, 32 lines modified | ||
1050 | <span·class="gp">···....:·</span> | 1058 | <span·class="gp">···....:·</span> |
1051 | <span·class="gp">In·[21]:·</span><span·class="n">df</span> | 1059 | <span·class="gp">In·[21]:·</span><span·class="n">df</span> |
1052 | <span·class="gh">Out[21]:·</span> | 1060 | <span·class="gh">Out[21]:·</span> |
1053 | <span·class="go">···year··month··day··hour</span> | 1061 | <span·class="go">···year··month··day··hour</span> |
1054 | <span·class="go">0··2015······2····4·····2</span> | 1062 | <span·class="go">0··2015······2····4·····2</span> |
1055 | <span·class="go">1··2016······3····5·····3</span> | 1063 | <span·class="go">1··2016······3····5·····3</span> |
1064 | <span·class="go">[2·rows·x·4·columns]</span> | ||
1056 | </pre></div> | 1065 | </pre></div> |
1057 | </div> | 1066 | </div> |
1058 | <p>Assembling·using·the·passed·frame.</p> | 1067 | <p>Assembling·using·the·passed·frame.</p> |
1059 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[22]:·</span><span·class="n">pd</span><span·class="o">.</span><span·class="n">to_datetime</span><span·class="p">(</span><span·class="n">df</span><span·class="p">)</span> | 1068 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[22]:·</span><span·class="n">pd</span><span·class="o">.</span><span·class="n">to_datetime</span><span·class="p">(</span><span·class="n">df</span><span·class="p">)</span> |
1060 | <span·class="gh">Out[22]:·</span> | 1069 | <span·class="gh">Out[22]:·</span> |
1061 | <span·class="go">0···2015-02-04·02:00:00</span> | 1070 | <span·class="go">0···2015-02-04·02:00:00</span> |
1062 | <span·class="go">1···2016-03-05·03:00:00</span> | 1071 | <span·class="go">1···2016-03-05·03:00:00</span> |
1063 | <span·class="go">dtype:·datetime64[ns]</span> | 1072 | <span·class="go">Length:·2,·dtype:·datetime64[ns]</span> |
1064 | </pre></div> | 1073 | </pre></div> |
1065 | </div> | 1074 | </div> |
1066 | <p>You·can·pass·only·the·columns·that·you·need·to·assemble.</p> | 1075 | <p>You·can·pass·only·the·columns·that·you·need·to·assemble.</p> |
1067 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[23]:·</span><span·class="n">pd</span><span·class="o">.</span><span·class="n">to_datetime</span><span·class="p">(</span><span·class="n">df</span><span·class="p">[[</span><span·class="s2">"year"</span><span·class="p">,</span>·<span·class="s2">"month"</span><span·class="p">,</span>·<span·class="s2">"day"</span><span·class="p">]])</span> | 1076 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[23]:·</span><span·class="n">pd</span><span·class="o">.</span><span·class="n">to_datetime</span><span·class="p">(</span><span·class="n">df</span><span·class="p">[[</span><span·class="s2">"year"</span><span·class="p">,</span>·<span·class="s2">"month"</span><span·class="p">,</span>·<span·class="s2">"day"</span><span·class="p">]])</span> |
1068 | <span·class="gh">Out[23]:·</span> | 1077 | <span·class="gh">Out[23]:·</span> |
1069 | <span·class="go">0···2015-02-04</span> | 1078 | <span·class="go">0···2015-02-04</span> |
1070 | <span·class="go">1···2016-03-05</span> | 1079 | <span·class="go">1···2016-03-05</span> |
1071 | <span·class="go">dtype:·datetime64[ns]</span> | 1080 | <span·class="go">Length:·2,·dtype:·datetime64[ns]</span> |
1072 | </pre></div> | 1081 | </pre></div> |
1073 | </div> | 1082 | </div> |
1074 | </section> | 1083 | </section> |
1075 | <section·id="other-enhancements"> | 1084 | <section·id="other-enhancements"> |
1076 | <span·id="whatsnew-0181-other"></span><h3>Other·enhancements<a·class="headerlink"·href="#other-enhancements"·title="Link·to·this·heading">#</a></h3> | 1085 | <span·id="whatsnew-0181-other"></span><h3>Other·enhancements<a·class="headerlink"·href="#other-enhancements"·title="Link·to·this·heading">#</a></h3> |
1077 | <ul> | 1086 | <ul> |
1078 | <li><p><code·class="docutils·literal·notranslate"><span·class="pre">pd.read_csv()</span></code>·now·supports·<code·class="docutils·literal·notranslate"><span·class="pre">delim_whitespace=True</span></code>·for·the·Python·engine·(<a·class="extlink-issue·reference·external"·href="https://github.com/pandas-dev/pandas/issues/12958">GH·12958</a>)</p></li> | 1087 | <li><p><code·class="docutils·literal·notranslate"><span·class="pre">pd.read_csv()</span></code>·now·supports·<code·class="docutils·literal·notranslate"><span·class="pre">delim_whitespace=True</span></code>·for·the·Python·engine·(<a·class="extlink-issue·reference·external"·href="https://github.com/pandas-dev/pandas/issues/12958">GH·12958</a>)</p></li> |
Offset 1158, 14 lines modified | Offset 1168, 16 lines modified | ||
1158 | <span·class="gp">In·[30]:·</span><span·class="n">df</span> | 1168 | <span·class="gp">In·[30]:·</span><span·class="n">df</span> |
1159 | <span·class="gh">Out[30]:·</span> | 1169 | <span·class="gh">Out[30]:·</span> |
1160 | <span·class="go">···A··B</span> | 1170 | <span·class="go">···A··B</span> |
1161 | <span·class="go">0··a··1</span> | 1171 | <span·class="go">0··a··1</span> |
1162 | <span·class="go">1··b··2</span> | 1172 | <span·class="go">1··b··2</span> |
1163 | <span·class="go">2··a··3</span> | 1173 | <span·class="go">2··a··3</span> |
1174 | <span·class="go">[3·rows·x·2·columns]</span> | ||
1164 | </pre></div> | 1175 | </pre></div> |
1165 | </div> | 1176 | </div> |
1166 | <p>Previous·behavior:</p> | 1177 | <p>Previous·behavior:</p> |
1167 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[3]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">groupby</span><span·class="p">(</span><span·class="s1">'A'</span><span·class="p">,</span>·<span·class="n">as_index</span><span·class="o">=</span><span·class="kc">True</span><span·class="p">)[</span><span·class="s1">'B'</span><span·class="p">]</span><span·class="o">.</span><span·class="n">nth</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">)</span> | 1178 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[3]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">groupby</span><span·class="p">(</span><span·class="s1">'A'</span><span·class="p">,</span>·<span·class="n">as_index</span><span·class="o">=</span><span·class="kc">True</span><span·class="p">)[</span><span·class="s1">'B'</span><span·class="p">]</span><span·class="o">.</span><span·class="n">nth</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">)</span> |
1168 | <span·class="gh">Out[3]:</span> | 1179 | <span·class="gh">Out[3]:</span> |
1169 | <span·class="go">0····1</span> | 1180 | <span·class="go">0····1</span> |
1170 | <span·class="go">1····2</span> | 1181 | <span·class="go">1····2</span> |
Offset 1179, 21 lines modified | Offset 1191, 21 lines modified | ||
1179 | </pre></div> | 1191 | </pre></div> |
1180 | </div> | 1192 | </div> |
1181 | <p>New·behavior:</p> | 1193 | <p>New·behavior:</p> |
1182 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[31]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">groupby</span><span·class="p">(</span><span·class="s2">"A"</span><span·class="p">,</span>·<span·class="n">as_index</span><span·class="o">=</span><span·class="kc">True</span><span·class="p">)[</span><span·class="s2">"B"</span><span·class="p">]</span><span·class="o">.</span><span·class="n">nth</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">)</span> | 1194 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[31]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">groupby</span><span·class="p">(</span><span·class="s2">"A"</span><span·class="p">,</span>·<span·class="n">as_index</span><span·class="o">=</span><span·class="kc">True</span><span·class="p">)[</span><span·class="s2">"B"</span><span·class="p">]</span><span·class="o">.</span><span·class="n">nth</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">)</span> |
1183 | <span·class="gh">Out[31]:·</span> | 1195 | <span·class="gh">Out[31]:·</span> |
Max diff block lines reached; 5416/16683 bytes (32.46%) of diff not shown. |
Offset 281, 14 lines modified | Offset 281, 16 lines modified | ||
281 | Out[12]: | 281 | Out[12]: |
282 | ············group··val | 282 | ············group··val |
283 | date | 283 | date |
284 | 2016-01-03······1····5 | 284 | 2016-01-03······1····5 |
285 | 2016-01-10······1····6 | 285 | 2016-01-10······1····6 |
286 | 2016-01-17······2····7 | 286 | 2016-01-17······2····7 |
287 | 2016-01-24······2····8 | 287 | 2016-01-24······2····8 |
288 | [4·rows·x·2·columns] | ||
288 | In[1]:·df.groupby("group").apply(lambda·x:·x.resample("1D").ffill()) | 289 | In[1]:·df.groupby("group").apply(lambda·x:·x.resample("1D").ffill()) |
289 | Out[1]: | 290 | Out[1]: |
290 | ··················group··val | 291 | ··················group··val |
291 | group·date | 292 | group·date |
292 | 1·····2016-01-03······1····5 | 293 | 1·····2016-01-03······1····5 |
293 | ······2016-01-04······1····5 | 294 | ······2016-01-04······1····5 |
294 | ······2016-01-05······1····5 | 295 | ······2016-01-05······1····5 |
Offset 338, 41 lines modified | Offset 340, 47 lines modified | ||
338 | In·[14]:·df.where(lambda·x:·x·>·4,·lambda·x:·x·+·10) | 340 | In·[14]:·df.where(lambda·x:·x·>·4,·lambda·x:·x·+·10) |
339 | Out[14]: | 341 | Out[14]: |
340 | ····A···B··C | 342 | ····A···B··C |
341 | 0··11··14··7 | 343 | 0··11··14··7 |
342 | 1··12···5··8 | 344 | 1··12···5··8 |
343 | 2··13···6··9 | 345 | 2··13···6··9 |
346 | [3·rows·x·3·columns] | ||
344 | *\x8**\x8**\x8*·M\x8Me\x8et\x8th\x8ho\x8od\x8ds\x8s·.\x8.l\x8lo\x8oc\x8c[\x8[]\x8],\x8,·.\x8.i\x8il\x8lo\x8oc\x8c[\x8[]\x8],\x8,·.\x8.i\x8ix\x8x[\x8[]\x8]_\x8#\x8#·*\x8**\x8**\x8* | 347 | *\x8**\x8**\x8*·M\x8Me\x8et\x8th\x8ho\x8od\x8ds\x8s·.\x8.l\x8lo\x8oc\x8c[\x8[]\x8],\x8,·.\x8.i\x8il\x8lo\x8oc\x8c[\x8[]\x8],\x8,·.\x8.i\x8ix\x8x[\x8[]\x8]_\x8#\x8#·*\x8**\x8**\x8* |
345 | These·can·accept·a·callable,·and·a·tuple·of·callable·as·a·slicer.·The·callable | 348 | These·can·accept·a·callable,·and·a·tuple·of·callable·as·a·slicer.·The·callable |
346 | can·return·a·valid·boolean·indexer·or·anything·which·is·valid·for·these | 349 | can·return·a·valid·boolean·indexer·or·anything·which·is·valid·for·these |
347 | indexer’s·input. | 350 | indexer’s·input. |
348 | #·callable·returns·bool·indexer | 351 | #·callable·returns·bool·indexer |
349 | In·[15]:·df.loc[lambda·x:·x.A·>=·2,·lambda·x:·x.sum()·>·10] | 352 | In·[15]:·df.loc[lambda·x:·x.A·>=·2,·lambda·x:·x.sum()·>·10] |
350 | Out[15]: | 353 | Out[15]: |
351 | ···B··C | 354 | ···B··C |
352 | 1··5··8 | 355 | 1··5··8 |
353 | 2··6··9 | 356 | 2··6··9 |
357 | [2·rows·x·2·columns] | ||
354 | #·callable·returns·list·of·labels | 358 | #·callable·returns·list·of·labels |
355 | In·[16]:·df.loc[lambda·x:·[1,·2],·lambda·x:·["A",·"B"]] | 359 | In·[16]:·df.loc[lambda·x:·[1,·2],·lambda·x:·["A",·"B"]] |
356 | Out[16]: | 360 | Out[16]: |
357 | ···A··B | 361 | ···A··B |
358 | 1··2··5 | 362 | 1··2··5 |
359 | 2··3··6 | 363 | 2··3··6 |
364 | [2·rows·x·2·columns] | ||
360 | *\x8**\x8**\x8*·I\x8In\x8nd\x8de\x8ex\x8xi\x8in\x8ng\x8g·w\x8wi\x8it\x8th\x8h·[\x8[]\x8]_\x8#\x8#·*\x8**\x8**\x8* | 365 | *\x8**\x8**\x8*·I\x8In\x8nd\x8de\x8ex\x8xi\x8in\x8ng\x8g·w\x8wi\x8it\x8th\x8h·[\x8[]\x8]_\x8#\x8#·*\x8**\x8**\x8* |
361 | Finally,·you·can·use·a·callable·in·[]·indexing·of·Series,·DataFrame·and·Panel. | 366 | Finally,·you·can·use·a·callable·in·[]·indexing·of·Series,·DataFrame·and·Panel. |
362 | The·callable·must·return·a·valid·input·for·[]·indexing·depending·on·its·class | 367 | The·callable·must·return·a·valid·input·for·[]·indexing·depending·on·its·class |
363 | and·index·type. | 368 | and·index·type. |
364 | In·[17]:·df[lambda·x:·"A"] | 369 | In·[17]:·df[lambda·x:·"A"] |
365 | Out[17]: | 370 | Out[17]: |
366 | 0····1 | 371 | 0····1 |
367 | 1····2 | 372 | 1····2 |
368 | 2····3 | 373 | 2····3 |
369 | Name:·A,·dtype:·int64 | 374 | Name:·A,·Length:·3,·dtype:·int64 |
370 | Using·these·methods·/·indexers,·you·can·chain·data·selection·operations·without | 375 | Using·these·methods·/·indexers,·you·can·chain·data·selection·operations·without |
371 | using·temporary·variable. | 376 | using·temporary·variable. |
372 | In·[18]:·bb·=·pd.read_csv("data/baseball.csv",·index_col="id") | 377 | In·[18]:·bb·=·pd.read_csv("data/baseball.csv",·index_col="id") |
373 | In·[19]:·(bb.groupby(["year",·"team"]).sum(numeric_only=True).loc[lambda·df: | 378 | In·[19]:·(bb.groupby(["year",·"team"]).sum(numeric_only=True).loc[lambda·df: |
374 | df.r·>·100]) | 379 | df.r·>·100]) |
375 | Out[19]: | 380 | Out[19]: |
Offset 478, 26 lines modified | Offset 486, 28 lines modified | ||
478 | ···....: | 486 | ···....: |
479 | In·[21]:·df | 487 | In·[21]:·df |
480 | Out[21]: | 488 | Out[21]: |
481 | ···year··month··day··hour | 489 | ···year··month··day··hour |
482 | 0··2015······2····4·····2 | 490 | 0··2015······2····4·····2 |
483 | 1··2016······3····5·····3 | 491 | 1··2016······3····5·····3 |
492 | [2·rows·x·4·columns] | ||
484 | Assembling·using·the·passed·frame. | 493 | Assembling·using·the·passed·frame. |
485 | In·[22]:·pd.to_datetime(df) | 494 | In·[22]:·pd.to_datetime(df) |
486 | Out[22]: | 495 | Out[22]: |
487 | 0···2015-02-04·02:00:00 | 496 | 0···2015-02-04·02:00:00 |
488 | 1···2016-03-05·03:00:00 | 497 | 1···2016-03-05·03:00:00 |
489 | dtype:·datetime64[ns] | 498 | Length:·2,·dtype:·datetime64[ns] |
490 | You·can·pass·only·the·columns·that·you·need·to·assemble. | 499 | You·can·pass·only·the·columns·that·you·need·to·assemble. |
491 | In·[23]:·pd.to_datetime(df[["year",·"month",·"day"]]) | 500 | In·[23]:·pd.to_datetime(df[["year",·"month",·"day"]]) |
492 | Out[23]: | 501 | Out[23]: |
493 | 0···2015-02-04 | 502 | 0···2015-02-04 |
494 | 1···2016-03-05 | 503 | 1···2016-03-05 |
495 | dtype:·datetime64[ns] | 504 | Length:·2,·dtype:·datetime64[ns] |
496 | *\x8**\x8**\x8**\x8*·O\x8Ot\x8th\x8he\x8er\x8r·e\x8en\x8nh\x8ha\x8an\x8nc\x8ce\x8em\x8me\x8en\x8nt\x8ts\x8s_\x8#\x8#·*\x8**\x8**\x8**\x8* | 505 | *\x8**\x8**\x8**\x8*·O\x8Ot\x8th\x8he\x8er\x8r·e\x8en\x8nh\x8ha\x8an\x8nc\x8ce\x8em\x8me\x8en\x8nt\x8ts\x8s_\x8#\x8#·*\x8**\x8**\x8**\x8* |
497 | ····*·pd.read_csv()·now·supports·delim_whitespace=True·for·the·Python·engine | 506 | ····*·pd.read_csv()·now·supports·delim_whitespace=True·for·the·Python·engine |
498 | ······(_\x8G_\x8H_\x8·_\x81_\x82_\x89_\x85_\x88) | 507 | ······(_\x8G_\x8H_\x8·_\x81_\x82_\x89_\x85_\x88) |
499 | ····*·pd.read_csv()·now·supports·opening·ZIP·files·that·contains·a·single·CSV, | 508 | ····*·pd.read_csv()·now·supports·opening·ZIP·files·that·contains·a·single·CSV, |
500 | ······via·extension·inference·or·explicit·compression='zip'·(_\x8G_\x8H_\x8·_\x81_\x82_\x81_\x87_\x85) | 509 | ······via·extension·inference·or·explicit·compression='zip'·(_\x8G_\x8H_\x8·_\x81_\x82_\x81_\x87_\x85) |
501 | ····*·pd.read_csv()·now·supports·opening·files·using·xz·compression,·via | 510 | ····*·pd.read_csv()·now·supports·opening·files·using·xz·compression,·via |
502 | ······extension·inference·or·explicit·compression='xz'·is·specified;·xz | 511 | ······extension·inference·or·explicit·compression='xz'·is·specified;·xz |
Offset 589, 14 lines modified | Offset 599, 16 lines modified | ||
589 | In·[30]:·df | 599 | In·[30]:·df |
590 | Out[30]: | 600 | Out[30]: |
591 | ···A··B | 601 | ···A··B |
592 | 0··a··1 | 602 | 0··a··1 |
593 | 1··b··2 | 603 | 1··b··2 |
594 | 2··a··3 | 604 | 2··a··3 |
605 | [3·rows·x·2·columns] | ||
595 | Previous·behavior: | 606 | Previous·behavior: |
596 | In·[3]:·df.groupby('A',·as_index=True)['B'].nth(0) | 607 | In·[3]:·df.groupby('A',·as_index=True)['B'].nth(0) |
597 | Out[3]: | 608 | Out[3]: |
598 | 0····1 | 609 | 0····1 |
599 | 1····2 | 610 | 1····2 |
600 | Name:·B,·dtype:·int64 | 611 | Name:·B,·dtype:·int64 |
Offset 606, 21 lines modified | Offset 618, 21 lines modified | ||
606 | 1····2 | 618 | 1····2 |
607 | Name:·B,·dtype:·int64 | 619 | Name:·B,·dtype:·int64 |
608 | New·behavior: | 620 | New·behavior: |
609 | In·[31]:·df.groupby("A",·as_index=True)["B"].nth(0) | 621 | In·[31]:·df.groupby("A",·as_index=True)["B"].nth(0) |
610 | Out[31]: | 622 | Out[31]: |
611 | 0····1 | 623 | 0····1 |
612 | 1····2 | 624 | 1····2 |
613 | Name:·B,·dtype:·int64 | 625 | Name:·B,·Length:·2,·dtype:·int64 |
614 | In·[32]:·df.groupby("A",·as_index=False)["B"].nth(0) | 626 | In·[32]:·df.groupby("A",·as_index=False)["B"].nth(0) |
615 | Out[32]: | 627 | Out[32]: |
616 | 0····1 | 628 | 0····1 |
617 | 1····2 | 629 | 1····2 |
618 | Name:·B,·dtype:·int64 | 630 | Name:·B,·Length:·2,·dtype:·int64 |
619 | Furthermore,·previously,·a·.groupby·would·always·sort,·regardless·if·sort=False | 631 | Furthermore,·previously,·a·.groupby·would·always·sort,·regardless·if·sort=False |
620 | was·passed·with·.nth(). | 632 | was·passed·with·.nth(). |
Max diff block lines reached; 1469/5041 bytes (29.14%) of diff not shown. |
Offset 756, 41 lines modified | Offset 756, 49 lines modified | ||
756 | <span·class="gp">In·[3]:·</span><span·class="n">left</span> | 756 | <span·class="gp">In·[3]:·</span><span·class="n">left</span> |
757 | <span·class="gh">Out[3]:·</span> | 757 | <span·class="gh">Out[3]:·</span> |
758 | <span·class="go">····a·left_val</span> | 758 | <span·class="go">····a·left_val</span> |
759 | <span·class="go">0···1········a</span> | 759 | <span·class="go">0···1········a</span> |
760 | <span·class="go">1···5········b</span> | 760 | <span·class="go">1···5········b</span> |
761 | <span·class="go">2··10········c</span> | 761 | <span·class="go">2··10········c</span> |
762 | <span·class="go">[3·rows·x·2·columns]</span> | ||
762 | <span·class="gp">In·[4]:·</span><span·class="n">right</span> | 763 | <span·class="gp">In·[4]:·</span><span·class="n">right</span> |
763 | <span·class="gh">Out[4]:·</span> | 764 | <span·class="gh">Out[4]:·</span> |
764 | <span·class="go">···a··right_val</span> | 765 | <span·class="go">···a··right_val</span> |
765 | <span·class="go">0··1··········1</span> | 766 | <span·class="go">0··1··········1</span> |
766 | <span·class="go">1··2··········2</span> | 767 | <span·class="go">1··2··········2</span> |
767 | <span·class="go">2··3··········3</span> | 768 | <span·class="go">2··3··········3</span> |
768 | <span·class="go">3··6··········6</span> | 769 | <span·class="go">3··6··········6</span> |
769 | <span·class="go">4··7··········7</span> | 770 | <span·class="go">4··7··········7</span> |
771 | <span·class="go">[5·rows·x·2·columns]</span> | ||
770 | </pre></div> | 772 | </pre></div> |
771 | </div> | 773 | </div> |
772 | <p>We·typically·want·to·match·exactly·when·possible,·and·use·the·most | 774 | <p>We·typically·want·to·match·exactly·when·possible,·and·use·the·most |
773 | recent·value·otherwise.</p> | 775 | recent·value·otherwise.</p> |
774 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[5]:·</span><span·class="n">pd</span><span·class="o">.</span><span·class="n">merge_asof</span><span·class="p">(</span><span·class="n">left</span><span·class="p">,</span>·<span·class="n">right</span><span·class="p">,</span>·<span·class="n">on</span><span·class="o">=</span><span·class="s2">"a"</span><span·class="p">)</span> | 776 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[5]:·</span><span·class="n">pd</span><span·class="o">.</span><span·class="n">merge_asof</span><span·class="p">(</span><span·class="n">left</span><span·class="p">,</span>·<span·class="n">right</span><span·class="p">,</span>·<span·class="n">on</span><span·class="o">=</span><span·class="s2">"a"</span><span·class="p">)</span> |
775 | <span·class="gh">Out[5]:·</span> | 777 | <span·class="gh">Out[5]:·</span> |
776 | <span·class="go">····a·left_val··right_val</span> | 778 | <span·class="go">····a·left_val··right_val</span> |
777 | <span·class="go">0···1········a··········1</span> | 779 | <span·class="go">0···1········a··········1</span> |
778 | <span·class="go">1···5········b··········3</span> | 780 | <span·class="go">1···5········b··········3</span> |
779 | <span·class="go">2··10········c··········7</span> | 781 | <span·class="go">2··10········c··········7</span> |
782 | <span·class="go">[3·rows·x·3·columns]</span> | ||
780 | </pre></div> | 783 | </pre></div> |
781 | </div> | 784 | </div> |
782 | <p>We·can·also·match·rows·ONLY·with·prior·data,·and·not·an·exact·match.</p> | 785 | <p>We·can·also·match·rows·ONLY·with·prior·data,·and·not·an·exact·match.</p> |
783 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[6]:·</span><span·class="n">pd</span><span·class="o">.</span><span·class="n">merge_asof</span><span·class="p">(</span><span·class="n">left</span><span·class="p">,</span>·<span·class="n">right</span><span·class="p">,</span>·<span·class="n">on</span><span·class="o">=</span><span·class="s2">"a"</span><span·class="p">,</span>·<span·class="n">allow_exact_matches</span><span·class="o">=</span><span·class="kc">False</span><span·class="p">)</span> | 786 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[6]:·</span><span·class="n">pd</span><span·class="o">.</span><span·class="n">merge_asof</span><span·class="p">(</span><span·class="n">left</span><span·class="p">,</span>·<span·class="n">right</span><span·class="p">,</span>·<span·class="n">on</span><span·class="o">=</span><span·class="s2">"a"</span><span·class="p">,</span>·<span·class="n">allow_exact_matches</span><span·class="o">=</span><span·class="kc">False</span><span·class="p">)</span> |
784 | <span·class="gh">Out[6]:·</span> | 787 | <span·class="gh">Out[6]:·</span> |
785 | <span·class="go">····a·left_val··right_val</span> | 788 | <span·class="go">····a·left_val··right_val</span> |
786 | <span·class="go">0···1········a········NaN</span> | 789 | <span·class="go">0···1········a········NaN</span> |
787 | <span·class="go">1···5········b········3.0</span> | 790 | <span·class="go">1···5········b········3.0</span> |
788 | <span·class="go">2··10········c········7.0</span> | 791 | <span·class="go">2··10········c········7.0</span> |
792 | <span·class="go">[3·rows·x·3·columns]</span> | ||
789 | </pre></div> | 793 | </pre></div> |
790 | </div> | 794 | </div> |
791 | <p>In·a·typical·time-series·example,·we·have·<code·class="docutils·literal·notranslate"><span·class="pre">trades</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">quotes</span></code>·and·we·want·to·<code·class="docutils·literal·notranslate"><span·class="pre">asof-join</span></code>·them. | 795 | <p>In·a·typical·time-series·example,·we·have·<code·class="docutils·literal·notranslate"><span·class="pre">trades</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">quotes</span></code>·and·we·want·to·<code·class="docutils·literal·notranslate"><span·class="pre">asof-join</span></code>·them. |
792 | This·also·illustrates·using·the·<code·class="docutils·literal·notranslate"><span·class="pre">by</span></code>·parameter·to·group·data·before·merging.</p> | 796 | This·also·illustrates·using·the·<code·class="docutils·literal·notranslate"><span·class="pre">by</span></code>·parameter·to·group·data·before·merging.</p> |
793 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[7]:·</span><span·class="n">trades</span>·<span·class="o">=</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">DataFrame</span><span·class="p">(</span> | 797 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[7]:·</span><span·class="n">trades</span>·<span·class="o">=</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">DataFrame</span><span·class="p">(</span> |
794 | <span·class="gp">···...:·</span>····<span·class="p">{</span> | 798 | <span·class="gp">···...:·</span>····<span·class="p">{</span> |
795 | <span·class="gp">···...:·</span>········<span·class="s2">"time"</span><span·class="p">:</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">to_datetime</span><span·class="p">(</span> | 799 | <span·class="gp">···...:·</span>········<span·class="s2">"time"</span><span·class="p">:</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">to_datetime</span><span·class="p">(</span> |
Offset 838, 38 lines modified | Offset 846, 44 lines modified | ||
838 | <span·class="go">·····················time·ticker···price··quantity</span> | 846 | <span·class="go">·····················time·ticker···price··quantity</span> |
839 | <span·class="go">0·2016-05-25·13:30:00.023···MSFT···51.95········75</span> | 847 | <span·class="go">0·2016-05-25·13:30:00.023···MSFT···51.95········75</span> |
840 | <span·class="go">1·2016-05-25·13:30:00.038···MSFT···51.95·······155</span> | 848 | <span·class="go">1·2016-05-25·13:30:00.038···MSFT···51.95·······155</span> |
841 | <span·class="go">2·2016-05-25·13:30:00.048···GOOG··720.77·······100</span> | 849 | <span·class="go">2·2016-05-25·13:30:00.048···GOOG··720.77·······100</span> |
842 | <span·class="go">3·2016-05-25·13:30:00.048···GOOG··720.92·······100</span> | 850 | <span·class="go">3·2016-05-25·13:30:00.048···GOOG··720.92·······100</span> |
843 | <span·class="go">4·2016-05-25·13:30:00.048···AAPL···98.00·······100</span> | 851 | <span·class="go">4·2016-05-25·13:30:00.048···AAPL···98.00·······100</span> |
852 | <span·class="go">[5·rows·x·4·columns]</span> | ||
844 | <span·class="gp">In·[10]:·</span><span·class="n">quotes</span> | 853 | <span·class="gp">In·[10]:·</span><span·class="n">quotes</span> |
845 | <span·class="gh">Out[10]:·</span> | 854 | <span·class="gh">Out[10]:·</span> |
846 | <span·class="go">·····················time·ticker·····bid·····ask</span> | 855 | <span·class="go">·····················time·ticker·····bid·····ask</span> |
847 | <span·class="go">0·2016-05-25·13:30:00.023···GOOG··720.50··720.93</span> | 856 | <span·class="go">0·2016-05-25·13:30:00.023···GOOG··720.50··720.93</span> |
848 | <span·class="go">1·2016-05-25·13:30:00.023···MSFT···51.95···51.96</span> | 857 | <span·class="go">1·2016-05-25·13:30:00.023···MSFT···51.95···51.96</span> |
849 | <span·class="go">2·2016-05-25·13:30:00.030···MSFT···51.97···51.98</span> | 858 | <span·class="go">2·2016-05-25·13:30:00.030···MSFT···51.97···51.98</span> |
850 | <span·class="go">3·2016-05-25·13:30:00.041···MSFT···51.99···52.00</span> | 859 | <span·class="go">3·2016-05-25·13:30:00.041···MSFT···51.99···52.00</span> |
851 | <span·class="go">4·2016-05-25·13:30:00.048···GOOG··720.50··720.93</span> | 860 | <span·class="go">4·2016-05-25·13:30:00.048···GOOG··720.50··720.93</span> |
852 | <span·class="go">5·2016-05-25·13:30:00.049···AAPL···97.99···98.01</span> | 861 | <span·class="go">5·2016-05-25·13:30:00.049···AAPL···97.99···98.01</span> |
853 | <span·class="go">6·2016-05-25·13:30:00.072···GOOG··720.50··720.88</span> | 862 | <span·class="go">6·2016-05-25·13:30:00.072···GOOG··720.50··720.88</span> |
854 | <span·class="go">7·2016-05-25·13:30:00.075···MSFT···52.01···52.03</span> | 863 | <span·class="go">7·2016-05-25·13:30:00.075···MSFT···52.01···52.03</span> |
864 | <span·class="go">[8·rows·x·4·columns]</span> | ||
855 | </pre></div> | 865 | </pre></div> |
856 | </div> | 866 | </div> |
857 | <p>An·asof·merge·joins·on·the·<code·class="docutils·literal·notranslate"><span·class="pre">on</span></code>,·typically·a·datetimelike·field,·which·is·ordered,·and | 867 | <p>An·asof·merge·joins·on·the·<code·class="docutils·literal·notranslate"><span·class="pre">on</span></code>,·typically·a·datetimelike·field,·which·is·ordered,·and |
858 | in·this·case·we·are·using·a·grouper·in·the·<code·class="docutils·literal·notranslate"><span·class="pre">by</span></code>·field.·This·is·like·a·left-outer·join,·except | 868 | in·this·case·we·are·using·a·grouper·in·the·<code·class="docutils·literal·notranslate"><span·class="pre">by</span></code>·field.·This·is·like·a·left-outer·join,·except |
859 | that·forward·filling·happens·automatically·taking·the·most·recent·non-NaN·value.</p> | 869 | that·forward·filling·happens·automatically·taking·the·most·recent·non-NaN·value.</p> |
860 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[11]:·</span><span·class="n">pd</span><span·class="o">.</span><span·class="n">merge_asof</span><span·class="p">(</span><span·class="n">trades</span><span·class="p">,</span>·<span·class="n">quotes</span><span·class="p">,</span>·<span·class="n">on</span><span·class="o">=</span><span·class="s2">"time"</span><span·class="p">,</span>·<span·class="n">by</span><span·class="o">=</span><span·class="s2">"ticker"</span><span·class="p">)</span> | 870 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[11]:·</span><span·class="n">pd</span><span·class="o">.</span><span·class="n">merge_asof</span><span·class="p">(</span><span·class="n">trades</span><span·class="p">,</span>·<span·class="n">quotes</span><span·class="p">,</span>·<span·class="n">on</span><span·class="o">=</span><span·class="s2">"time"</span><span·class="p">,</span>·<span·class="n">by</span><span·class="o">=</span><span·class="s2">"ticker"</span><span·class="p">)</span> |
861 | <span·class="gh">Out[11]:·</span> | 871 | <span·class="gh">Out[11]:·</span> |
862 | <span·class="go">·····················time·ticker···price··quantity·····bid·····ask</span> | 872 | <span·class="go">·····················time·ticker···price··quantity·····bid·····ask</span> |
863 | <span·class="go">0·2016-05-25·13:30:00.023···MSFT···51.95········75···51.95···51.96</span> | 873 | <span·class="go">0·2016-05-25·13:30:00.023···MSFT···51.95········75···51.95···51.96</span> |
864 | <span·class="go">1·2016-05-25·13:30:00.038···MSFT···51.95·······155···51.97···51.98</span> | 874 | <span·class="go">1·2016-05-25·13:30:00.038···MSFT···51.95·······155···51.97···51.98</span> |
865 | <span·class="go">2·2016-05-25·13:30:00.048···GOOG··720.77·······100··720.50··720.93</span> | 875 | <span·class="go">2·2016-05-25·13:30:00.048···GOOG··720.77·······100··720.50··720.93</span> |
866 | <span·class="go">3·2016-05-25·13:30:00.048···GOOG··720.92·······100··720.50··720.93</span> | 876 | <span·class="go">3·2016-05-25·13:30:00.048···GOOG··720.92·······100··720.50··720.93</span> |
867 | <span·class="go">4·2016-05-25·13:30:00.048···AAPL···98.00·······100·····NaN·····NaN</span> | 877 | <span·class="go">4·2016-05-25·13:30:00.048···AAPL···98.00·······100·····NaN·····NaN</span> |
878 | <span·class="go">[5·rows·x·6·columns]</span> | ||
868 | </pre></div> | 879 | </pre></div> |
869 | </div> | 880 | </div> |
870 | <p>This·returns·a·merged·DataFrame·with·the·entries·in·the·same·order·as·the·original·left | 881 | <p>This·returns·a·merged·DataFrame·with·the·entries·in·the·same·order·as·the·original·left |
871 | passed·DataFrame·(<code·class="docutils·literal·notranslate"><span·class="pre">trades</span></code>·in·this·case),·with·the·fields·of·the·<code·class="docutils·literal·notranslate"><span·class="pre">quotes</span></code>·merged.</p> | 882 | passed·DataFrame·(<code·class="docutils·literal·notranslate"><span·class="pre">trades</span></code>·in·this·case),·with·the·fields·of·the·<code·class="docutils·literal·notranslate"><span·class="pre">quotes</span></code>·merged.</p> |
872 | </section> | 883 | </section> |
873 | <section·id="method-rolling-is-now-time-series-aware"> | 884 | <section·id="method-rolling-is-now-time-series-aware"> |
874 | <span·id="whatsnew-0190-enhancements-rolling-ts"></span><h3>Method·<code·class="docutils·literal·notranslate"><span·class="pre">.rolling()</span></code>·is·now·time-series·aware<a·class="headerlink"·href="#method-rolling-is-now-time-series-aware"·title="Link·to·this·heading">#</a></h3> | 885 | <span·id="whatsnew-0190-enhancements-rolling-ts"></span><h3>Method·<code·class="docutils·literal·notranslate"><span·class="pre">.rolling()</span></code>·is·now·time-series·aware<a·class="headerlink"·href="#method-rolling-is-now-time-series-aware"·title="Link·to·this·heading">#</a></h3> |
Offset 885, 45 lines modified | Offset 899, 53 lines modified | ||
885 | <span·class="gh">Out[13]:·</span> | 899 | <span·class="gh">Out[13]:·</span> |
886 | <span·class="go">·······················B</span> | 900 | <span·class="go">·······················B</span> |
887 | <span·class="go">2013-01-01·09:00:00··0.0</span> | 901 | <span·class="go">2013-01-01·09:00:00··0.0</span> |
888 | <span·class="go">2013-01-01·09:00:01··1.0</span> | 902 | <span·class="go">2013-01-01·09:00:01··1.0</span> |
889 | <span·class="go">2013-01-01·09:00:02··2.0</span> | 903 | <span·class="go">2013-01-01·09:00:02··2.0</span> |
890 | <span·class="go">2013-01-01·09:00:03··NaN</span> | 904 | <span·class="go">2013-01-01·09:00:03··NaN</span> |
891 | <span·class="go">2013-01-01·09:00:04··4.0</span> | 905 | <span·class="go">2013-01-01·09:00:04··4.0</span> |
906 | <span·class="go">[5·rows·x·1·columns]</span> | ||
892 | </pre></div> | 907 | </pre></div> |
893 | </div> | 908 | </div> |
894 | <p>This·is·a·regular·frequency·index.·Using·an·integer·window·parameter·works·to·roll·along·the·window·frequency.</p> | 909 | <p>This·is·a·regular·frequency·index.·Using·an·integer·window·parameter·works·to·roll·along·the·window·frequency.</p> |
895 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[14]:·</span><span·class="n">dft</span><span·class="o">.</span><span·class="n">rolling</span><span·class="p">(</span><span·class="mi">2</span><span·class="p">)</span><span·class="o">.</span><span·class="n">sum</span><span·class="p">()</span> | 910 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[14]:·</span><span·class="n">dft</span><span·class="o">.</span><span·class="n">rolling</span><span·class="p">(</span><span·class="mi">2</span><span·class="p">)</span><span·class="o">.</span><span·class="n">sum</span><span·class="p">()</span> |
896 | <span·class="gh">Out[14]:·</span> | 911 | <span·class="gh">Out[14]:·</span> |
897 | <span·class="go">·······················B</span> | 912 | <span·class="go">·······················B</span> |
898 | <span·class="go">2013-01-01·09:00:00··NaN</span> | 913 | <span·class="go">2013-01-01·09:00:00··NaN</span> |
899 | <span·class="go">2013-01-01·09:00:01··1.0</span> | 914 | <span·class="go">2013-01-01·09:00:01··1.0</span> |
900 | <span·class="go">2013-01-01·09:00:02··3.0</span> | 915 | <span·class="go">2013-01-01·09:00:02··3.0</span> |
901 | <span·class="go">2013-01-01·09:00:03··NaN</span> | 916 | <span·class="go">2013-01-01·09:00:03··NaN</span> |
902 | <span·class="go">2013-01-01·09:00:04··NaN</span> | 917 | <span·class="go">2013-01-01·09:00:04··NaN</span> |
918 | <span·class="go">[5·rows·x·1·columns]</span> | ||
903 | <span·class="gp">In·[15]:·</span><span·class="n">dft</span><span·class="o">.</span><span·class="n">rolling</span><span·class="p">(</span><span·class="mi">2</span><span·class="p">,</span>·<span·class="n">min_periods</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">)</span><span·class="o">.</span><span·class="n">sum</span><span·class="p">()</span> | 919 | <span·class="gp">In·[15]:·</span><span·class="n">dft</span><span·class="o">.</span><span·class="n">rolling</span><span·class="p">(</span><span·class="mi">2</span><span·class="p">,</span>·<span·class="n">min_periods</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">)</span><span·class="o">.</span><span·class="n">sum</span><span·class="p">()</span> |
904 | <span·class="gh">Out[15]:·</span> | 920 | <span·class="gh">Out[15]:·</span> |
905 | <span·class="go">·······················B</span> | 921 | <span·class="go">·······················B</span> |
906 | <span·class="go">2013-01-01·09:00:00··0.0</span> | 922 | <span·class="go">2013-01-01·09:00:00··0.0</span> |
907 | <span·class="go">2013-01-01·09:00:01··1.0</span> | 923 | <span·class="go">2013-01-01·09:00:01··1.0</span> |
908 | <span·class="go">2013-01-01·09:00:02··3.0</span> | 924 | <span·class="go">2013-01-01·09:00:02··3.0</span> |
909 | <span·class="go">2013-01-01·09:00:03··2.0</span> | 925 | <span·class="go">2013-01-01·09:00:03··2.0</span> |
910 | <span·class="go">2013-01-01·09:00:04··4.0</span> | 926 | <span·class="go">2013-01-01·09:00:04··4.0</span> |
Max diff block lines reached; 44379/53665 bytes (82.70%) of diff not shown. |
Offset 207, 37 lines modified | Offset 207, 45 lines modified | ||
207 | In·[3]:·left | 207 | In·[3]:·left |
208 | Out[3]: | 208 | Out[3]: |
209 | ····a·left_val | 209 | ····a·left_val |
210 | 0···1········a | 210 | 0···1········a |
211 | 1···5········b | 211 | 1···5········b |
212 | 2··10········c | 212 | 2··10········c |
213 | [3·rows·x·2·columns] | ||
213 | In·[4]:·right | 214 | In·[4]:·right |
214 | Out[4]: | 215 | Out[4]: |
215 | ···a··right_val | 216 | ···a··right_val |
216 | 0··1··········1 | 217 | 0··1··········1 |
217 | 1··2··········2 | 218 | 1··2··········2 |
218 | 2··3··········3 | 219 | 2··3··········3 |
219 | 3··6··········6 | 220 | 3··6··········6 |
220 | 4··7··········7 | 221 | 4··7··········7 |
222 | [5·rows·x·2·columns] | ||
221 | We·typically·want·to·match·exactly·when·possible,·and·use·the·most·recent·value | 223 | We·typically·want·to·match·exactly·when·possible,·and·use·the·most·recent·value |
222 | otherwise. | 224 | otherwise. |
223 | In·[5]:·pd.merge_asof(left,·right,·on="a") | 225 | In·[5]:·pd.merge_asof(left,·right,·on="a") |
224 | Out[5]: | 226 | Out[5]: |
225 | ····a·left_val··right_val | 227 | ····a·left_val··right_val |
226 | 0···1········a··········1 | 228 | 0···1········a··········1 |
227 | 1···5········b··········3 | 229 | 1···5········b··········3 |
228 | 2··10········c··········7 | 230 | 2··10········c··········7 |
231 | [3·rows·x·3·columns] | ||
229 | We·can·also·match·rows·ONLY·with·prior·data,·and·not·an·exact·match. | 232 | We·can·also·match·rows·ONLY·with·prior·data,·and·not·an·exact·match. |
230 | In·[6]:·pd.merge_asof(left,·right,·on="a",·allow_exact_matches=False) | 233 | In·[6]:·pd.merge_asof(left,·right,·on="a",·allow_exact_matches=False) |
231 | Out[6]: | 234 | Out[6]: |
232 | ····a·left_val··right_val | 235 | ····a·left_val··right_val |
233 | 0···1········a········NaN | 236 | 0···1········a········NaN |
234 | 1···5········b········3.0 | 237 | 1···5········b········3.0 |
235 | 2··10········c········7.0 | 238 | 2··10········c········7.0 |
239 | [3·rows·x·3·columns] | ||
236 | In·a·typical·time-series·example,·we·have·trades·and·quotes·and·we·want·to | 240 | In·a·typical·time-series·example,·we·have·trades·and·quotes·and·we·want·to |
237 | asof-join·them.·This·also·illustrates·using·the·by·parameter·to·group·data | 241 | asof-join·them.·This·also·illustrates·using·the·by·parameter·to·group·data |
238 | before·merging. | 242 | before·merging. |
239 | In·[7]:·trades·=·pd.DataFrame( | 243 | In·[7]:·trades·=·pd.DataFrame( |
240 | ···...:·····{ | 244 | ···...:·····{ |
241 | ···...:·········"time":·pd.to_datetime( | 245 | ···...:·········"time":·pd.to_datetime( |
242 | ···...:·············[ | 246 | ···...:·············[ |
Offset 285, 37 lines modified | Offset 293, 43 lines modified | ||
285 | ·····················time·ticker···price··quantity | 293 | ·····················time·ticker···price··quantity |
286 | 0·2016-05-25·13:30:00.023···MSFT···51.95········75 | 294 | 0·2016-05-25·13:30:00.023···MSFT···51.95········75 |
287 | 1·2016-05-25·13:30:00.038···MSFT···51.95·······155 | 295 | 1·2016-05-25·13:30:00.038···MSFT···51.95·······155 |
288 | 2·2016-05-25·13:30:00.048···GOOG··720.77·······100 | 296 | 2·2016-05-25·13:30:00.048···GOOG··720.77·······100 |
289 | 3·2016-05-25·13:30:00.048···GOOG··720.92·······100 | 297 | 3·2016-05-25·13:30:00.048···GOOG··720.92·······100 |
290 | 4·2016-05-25·13:30:00.048···AAPL···98.00·······100 | 298 | 4·2016-05-25·13:30:00.048···AAPL···98.00·······100 |
299 | [5·rows·x·4·columns] | ||
291 | In·[10]:·quotes | 300 | In·[10]:·quotes |
292 | Out[10]: | 301 | Out[10]: |
293 | ·····················time·ticker·····bid·····ask | 302 | ·····················time·ticker·····bid·····ask |
294 | 0·2016-05-25·13:30:00.023···GOOG··720.50··720.93 | 303 | 0·2016-05-25·13:30:00.023···GOOG··720.50··720.93 |
295 | 1·2016-05-25·13:30:00.023···MSFT···51.95···51.96 | 304 | 1·2016-05-25·13:30:00.023···MSFT···51.95···51.96 |
296 | 2·2016-05-25·13:30:00.030···MSFT···51.97···51.98 | 305 | 2·2016-05-25·13:30:00.030···MSFT···51.97···51.98 |
297 | 3·2016-05-25·13:30:00.041···MSFT···51.99···52.00 | 306 | 3·2016-05-25·13:30:00.041···MSFT···51.99···52.00 |
298 | 4·2016-05-25·13:30:00.048···GOOG··720.50··720.93 | 307 | 4·2016-05-25·13:30:00.048···GOOG··720.50··720.93 |
299 | 5·2016-05-25·13:30:00.049···AAPL···97.99···98.01 | 308 | 5·2016-05-25·13:30:00.049···AAPL···97.99···98.01 |
300 | 6·2016-05-25·13:30:00.072···GOOG··720.50··720.88 | 309 | 6·2016-05-25·13:30:00.072···GOOG··720.50··720.88 |
301 | 7·2016-05-25·13:30:00.075···MSFT···52.01···52.03 | 310 | 7·2016-05-25·13:30:00.075···MSFT···52.01···52.03 |
311 | [8·rows·x·4·columns] | ||
302 | An·asof·merge·joins·on·the·on,·typically·a·datetimelike·field,·which·is | 312 | An·asof·merge·joins·on·the·on,·typically·a·datetimelike·field,·which·is |
303 | ordered,·and·in·this·case·we·are·using·a·grouper·in·the·by·field.·This·is·like | 313 | ordered,·and·in·this·case·we·are·using·a·grouper·in·the·by·field.·This·is·like |
304 | a·left-outer·join,·except·that·forward·filling·happens·automatically·taking·the | 314 | a·left-outer·join,·except·that·forward·filling·happens·automatically·taking·the |
305 | most·recent·non-NaN·value. | 315 | most·recent·non-NaN·value. |
306 | In·[11]:·pd.merge_asof(trades,·quotes,·on="time",·by="ticker") | 316 | In·[11]:·pd.merge_asof(trades,·quotes,·on="time",·by="ticker") |
307 | Out[11]: | 317 | Out[11]: |
308 | ·····················time·ticker···price··quantity·····bid·····ask | 318 | ·····················time·ticker···price··quantity·····bid·····ask |
309 | 0·2016-05-25·13:30:00.023···MSFT···51.95········75···51.95···51.96 | 319 | 0·2016-05-25·13:30:00.023···MSFT···51.95········75···51.95···51.96 |
310 | 1·2016-05-25·13:30:00.038···MSFT···51.95·······155···51.97···51.98 | 320 | 1·2016-05-25·13:30:00.038···MSFT···51.95·······155···51.97···51.98 |
311 | 2·2016-05-25·13:30:00.048···GOOG··720.77·······100··720.50··720.93 | 321 | 2·2016-05-25·13:30:00.048···GOOG··720.77·······100··720.50··720.93 |
312 | 3·2016-05-25·13:30:00.048···GOOG··720.92·······100··720.50··720.93 | 322 | 3·2016-05-25·13:30:00.048···GOOG··720.92·······100··720.50··720.93 |
313 | 4·2016-05-25·13:30:00.048···AAPL···98.00·······100·····NaN·····NaN | 323 | 4·2016-05-25·13:30:00.048···AAPL···98.00·······100·····NaN·····NaN |
324 | [5·rows·x·6·columns] | ||
314 | This·returns·a·merged·DataFrame·with·the·entries·in·the·same·order·as·the | 325 | This·returns·a·merged·DataFrame·with·the·entries·in·the·same·order·as·the |
315 | original·left·passed·DataFrame·(trades·in·this·case),·with·the·fields·of·the | 326 | original·left·passed·DataFrame·(trades·in·this·case),·with·the·fields·of·the |
316 | quotes·merged. | 327 | quotes·merged. |
317 | *\x8**\x8**\x8**\x8*·M\x8Me\x8et\x8th\x8ho\x8od\x8d·.\x8.r\x8ro\x8ol\x8ll\x8li\x8in\x8ng\x8g(\x8()\x8)·i\x8is\x8s·n\x8no\x8ow\x8w·t\x8ti\x8im\x8me\x8e-\x8-s\x8se\x8er\x8ri\x8ie\x8es\x8s·a\x8aw\x8wa\x8ar\x8re\x8e_\x8#\x8#·*\x8**\x8**\x8**\x8* | 328 | *\x8**\x8**\x8**\x8*·M\x8Me\x8et\x8th\x8ho\x8od\x8d·.\x8.r\x8ro\x8ol\x8ll\x8li\x8in\x8ng\x8g(\x8()\x8)·i\x8is\x8s·n\x8no\x8ow\x8w·t\x8ti\x8im\x8me\x8e-\x8-s\x8se\x8er\x8ri\x8ie\x8es\x8s·a\x8aw\x8wa\x8ar\x8re\x8e_\x8#\x8#·*\x8**\x8**\x8**\x8* |
318 | .rolling()·objects·are·now·time-series·aware·and·can·accept·a·time-series | 329 | .rolling()·objects·are·now·time-series·aware·and·can·accept·a·time-series |
319 | offset·(or·convertible)·for·the·window·argument·(_\x8G_\x8H_\x8·_\x81_\x83_\x83_\x82_\x87,·_\x8G_\x8H_\x8·_\x81_\x82_\x89_\x89_\x85).·See·the | 330 | offset·(or·convertible)·for·the·window·argument·(_\x8G_\x8H_\x8·_\x81_\x83_\x83_\x82_\x87,·_\x8G_\x8H_\x8·_\x81_\x82_\x89_\x89_\x85).·See·the |
320 | full·documentation·_\x8h_\x8e_\x8r_\x8e. | 331 | full·documentation·_\x8h_\x8e_\x8r_\x8e. |
Offset 329, 43 lines modified | Offset 343, 51 lines modified | ||
329 | Out[13]: | 343 | Out[13]: |
330 | ·······················B | 344 | ·······················B |
331 | 2013-01-01·09:00:00··0.0 | 345 | 2013-01-01·09:00:00··0.0 |
332 | 2013-01-01·09:00:01··1.0 | 346 | 2013-01-01·09:00:01··1.0 |
333 | 2013-01-01·09:00:02··2.0 | 347 | 2013-01-01·09:00:02··2.0 |
334 | 2013-01-01·09:00:03··NaN | 348 | 2013-01-01·09:00:03··NaN |
335 | 2013-01-01·09:00:04··4.0 | 349 | 2013-01-01·09:00:04··4.0 |
350 | [5·rows·x·1·columns] | ||
336 | This·is·a·regular·frequency·index.·Using·an·integer·window·parameter·works·to | 351 | This·is·a·regular·frequency·index.·Using·an·integer·window·parameter·works·to |
337 | roll·along·the·window·frequency. | 352 | roll·along·the·window·frequency. |
338 | In·[14]:·dft.rolling(2).sum() | 353 | In·[14]:·dft.rolling(2).sum() |
339 | Out[14]: | 354 | Out[14]: |
340 | ·······················B | 355 | ·······················B |
341 | 2013-01-01·09:00:00··NaN | 356 | 2013-01-01·09:00:00··NaN |
342 | 2013-01-01·09:00:01··1.0 | 357 | 2013-01-01·09:00:01··1.0 |
343 | 2013-01-01·09:00:02··3.0 | 358 | 2013-01-01·09:00:02··3.0 |
344 | 2013-01-01·09:00:03··NaN | 359 | 2013-01-01·09:00:03··NaN |
345 | 2013-01-01·09:00:04··NaN | 360 | 2013-01-01·09:00:04··NaN |
361 | [5·rows·x·1·columns] | ||
346 | In·[15]:·dft.rolling(2,·min_periods=1).sum() | 362 | In·[15]:·dft.rolling(2,·min_periods=1).sum() |
347 | Out[15]: | 363 | Out[15]: |
348 | ·······················B | 364 | ·······················B |
349 | 2013-01-01·09:00:00··0.0 | 365 | 2013-01-01·09:00:00··0.0 |
350 | 2013-01-01·09:00:01··1.0 | 366 | 2013-01-01·09:00:01··1.0 |
351 | 2013-01-01·09:00:02··3.0 | 367 | 2013-01-01·09:00:02··3.0 |
352 | 2013-01-01·09:00:03··2.0 | 368 | 2013-01-01·09:00:03··2.0 |
353 | 2013-01-01·09:00:04··4.0 | 369 | 2013-01-01·09:00:04··4.0 |
370 | [5·rows·x·1·columns] | ||
354 | Specifying·an·offset·allows·a·more·intuitive·specification·of·the·rolling | 371 | Specifying·an·offset·allows·a·more·intuitive·specification·of·the·rolling |
355 | frequency. | 372 | frequency. |
356 | In·[16]:·dft.rolling("2s").sum() | 373 | In·[16]:·dft.rolling("2s").sum() |
357 | Out[16]: | 374 | Out[16]: |
358 | ·······················B | 375 | ·······················B |
Max diff block lines reached; 15983/20242 bytes (78.96%) of diff not shown. |
Offset 784, 43 lines modified | Offset 784, 49 lines modified | ||
784 | <span·class="go">2000-01-04·······NaN·······NaN·······NaN</span> | 784 | <span·class="go">2000-01-04·······NaN·······NaN·······NaN</span> |
785 | <span·class="go">2000-01-05·······NaN·······NaN·······NaN</span> | 785 | <span·class="go">2000-01-05·······NaN·······NaN·······NaN</span> |
786 | <span·class="go">2000-01-06·······NaN·······NaN·······NaN</span> | 786 | <span·class="go">2000-01-06·······NaN·······NaN·······NaN</span> |
787 | <span·class="go">2000-01-07·······NaN·······NaN·······NaN</span> | 787 | <span·class="go">2000-01-07·······NaN·······NaN·······NaN</span> |
788 | <span·class="go">2000-01-08··0.113648·-1.478427··0.524988</span> | 788 | <span·class="go">2000-01-08··0.113648·-1.478427··0.524988</span> |
789 | <span·class="go">2000-01-09··0.404705··0.577046·-1.715002</span> | 789 | <span·class="go">2000-01-09··0.404705··0.577046·-1.715002</span> |
790 | <span·class="go">2000-01-10·-1.039268·-0.370647·-1.157892</span> | 790 | <span·class="go">2000-01-10·-1.039268·-0.370647·-1.157892</span> |
791 | <span·class="go">[10·rows·x·3·columns]</span> | ||
791 | </pre></div> | 792 | </pre></div> |
792 | </div> | 793 | </div> |
793 | <p>One·can·operate·using·string·function·names,·callables,·lists,·or·dictionaries·of·these.</p> | 794 | <p>One·can·operate·using·string·function·names,·callables,·lists,·or·dictionaries·of·these.</p> |
794 | <p>Using·a·single·function·is·equivalent·to·<code·class="docutils·literal·notranslate"><span·class="pre">.apply</span></code>.</p> | 795 | <p>Using·a·single·function·is·equivalent·to·<code·class="docutils·literal·notranslate"><span·class="pre">.apply</span></code>.</p> |
795 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[4]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">agg</span><span·class="p">(</span><span·class="s1">'sum'</span><span·class="p">)</span> | 796 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[4]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">agg</span><span·class="p">(</span><span·class="s1">'sum'</span><span·class="p">)</span> |
796 | <span·class="gh">Out[4]:·</span> | 797 | <span·class="gh">Out[4]:·</span> |
797 | <span·class="go">A···-1.068226</span> | 798 | <span·class="go">A···-1.068226</span> |
798 | <span·class="go">B···-1.387015</span> | 799 | <span·class="go">B···-1.387015</span> |
799 | <span·class="go">C···-4.892029</span> | 800 | <span·class="go">C···-4.892029</span> |
800 | <span·class="go">dtype:·float64</span> | 801 | <span·class="go">Length:·3,·dtype:·float64</span> |
801 | </pre></div> | 802 | </pre></div> |
802 | </div> | 803 | </div> |
803 | <p>Multiple·aggregations·with·a·list·of·functions.</p> | 804 | <p>Multiple·aggregations·with·a·list·of·functions.</p> |
804 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[5]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">agg</span><span·class="p">([</span><span·class="s1">'sum'</span><span·class="p">,</span>·<span·class="s1">'min'</span><span·class="p">])</span> | 805 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[5]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">agg</span><span·class="p">([</span><span·class="s1">'sum'</span><span·class="p">,</span>·<span·class="s1">'min'</span><span·class="p">])</span> |
805 | <span·class="gh">Out[5]:·</span> | 806 | <span·class="gh">Out[5]:·</span> |
806 | <span·class="go">············A·········B·········C</span> | 807 | <span·class="go">············A·········B·········C</span> |
807 | <span·class="go">sum·-1.068226·-1.387015·-4.892029</span> | 808 | <span·class="go">sum·-1.068226·-1.387015·-4.892029</span> |
808 | <span·class="go">min·-1.135632·-1.478427·-1.715002</span> | 809 | <span·class="go">min·-1.135632·-1.478427·-1.715002</span> |
810 | <span·class="go">[2·rows·x·3·columns]</span> | ||
809 | </pre></div> | 811 | </pre></div> |
810 | </div> | 812 | </div> |
811 | <p>Using·a·dict·provides·the·ability·to·apply·specific·aggregations·per·column. | 813 | <p>Using·a·dict·provides·the·ability·to·apply·specific·aggregations·per·column. |
812 | You·will·get·a·matrix-like·output·of·all·of·the·aggregators.·The·output·has·one·column | 814 | You·will·get·a·matrix-like·output·of·all·of·the·aggregators.·The·output·has·one·column |
813 | per·unique·function.·Those·functions·applied·to·a·particular·column·will·be·<code·class="docutils·literal·notranslate"><span·class="pre">NaN</span></code>:</p> | 815 | per·unique·function.·Those·functions·applied·to·a·particular·column·will·be·<code·class="docutils·literal·notranslate"><span·class="pre">NaN</span></code>:</p> |
814 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[6]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">agg</span><span·class="p">({</span><span·class="s1">'A'</span><span·class="p">:</span>·<span·class="p">[</span><span·class="s1">'sum'</span><span·class="p">,</span>·<span·class="s1">'min'</span><span·class="p">],</span>·<span·class="s1">'B'</span><span·class="p">:</span>·<span·class="p">[</span><span·class="s1">'min'</span><span·class="p">,</span>·<span·class="s1">'max'</span><span·class="p">]})</span> | 816 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[6]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">agg</span><span·class="p">({</span><span·class="s1">'A'</span><span·class="p">:</span>·<span·class="p">[</span><span·class="s1">'sum'</span><span·class="p">,</span>·<span·class="s1">'min'</span><span·class="p">],</span>·<span·class="s1">'B'</span><span·class="p">:</span>·<span·class="p">[</span><span·class="s1">'min'</span><span·class="p">,</span>·<span·class="s1">'max'</span><span·class="p">]})</span> |
815 | <span·class="gh">Out[6]:·</span> | 817 | <span·class="gh">Out[6]:·</span> |
816 | <span·class="go">············A·········B</span> | 818 | <span·class="go">············A·········B</span> |
817 | <span·class="go">sum·-1.068226·······NaN</span> | 819 | <span·class="go">sum·-1.068226·······NaN</span> |
818 | <span·class="go">min·-1.135632·-1.478427</span> | 820 | <span·class="go">min·-1.135632·-1.478427</span> |
819 | <span·class="go">max·······NaN··1.212112</span> | 821 | <span·class="go">max·······NaN··1.212112</span> |
822 | <span·class="go">[3·rows·x·2·columns]</span> | ||
820 | </pre></div> | 823 | </pre></div> |
821 | </div> | 824 | </div> |
822 | <p>The·API·also·supports·a·<code·class="docutils·literal·notranslate"><span·class="pre">.transform()</span></code>·function·for·broadcasting·results.</p> | 825 | <p>The·API·also·supports·a·<code·class="docutils·literal·notranslate"><span·class="pre">.transform()</span></code>·function·for·broadcasting·results.</p> |
823 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[7]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">transform</span><span·class="p">([</span><span·class="s1">'abs'</span><span·class="p">,</span>·<span·class="k">lambda</span>·<span·class="n">x</span><span·class="p">:</span>·<span·class="n">x</span>·<span·class="o">-</span>·<span·class="n">x</span><span·class="o">.</span><span·class="n">min</span><span·class="p">()])</span> | 826 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[7]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">transform</span><span·class="p">([</span><span·class="s1">'abs'</span><span·class="p">,</span>·<span·class="k">lambda</span>·<span·class="n">x</span><span·class="p">:</span>·<span·class="n">x</span>·<span·class="o">-</span>·<span·class="n">x</span><span·class="o">.</span><span·class="n">min</span><span·class="p">()])</span> |
824 | <span·class="gh">Out[7]:·</span> | 827 | <span·class="gh">Out[7]:·</span> |
825 | <span·class="go">···················A···················B···················C··········</span> | 828 | <span·class="go">···················A···················B···················C··········</span> |
826 | <span·class="go">·················abs··<lambda>·······abs··<lambda>·······abs··<lambda></span> | 829 | <span·class="go">·················abs··<lambda>·······abs··<lambda>·······abs··<lambda></span> |
Offset 830, 14 lines modified | Offset 836, 16 lines modified | ||
830 | <span·class="go">2000-01-04·······NaN·······NaN·······NaN·······NaN·······NaN·······NaN</span> | 836 | <span·class="go">2000-01-04·······NaN·······NaN·······NaN·······NaN·······NaN·······NaN</span> |
831 | <span·class="go">2000-01-05·······NaN·······NaN·······NaN·······NaN·······NaN·······NaN</span> | 837 | <span·class="go">2000-01-05·······NaN·······NaN·······NaN·······NaN·······NaN·······NaN</span> |
832 | <span·class="go">2000-01-06·······NaN·······NaN·······NaN·······NaN·······NaN·······NaN</span> | 838 | <span·class="go">2000-01-06·······NaN·······NaN·······NaN·······NaN·······NaN·······NaN</span> |
833 | <span·class="go">2000-01-07·······NaN·······NaN·······NaN·······NaN·······NaN·······NaN</span> | 839 | <span·class="go">2000-01-07·······NaN·······NaN·······NaN·······NaN·······NaN·······NaN</span> |
834 | <span·class="go">2000-01-08··0.113648··1.249281··1.478427··0.000000··0.524988··2.239990</span> | 840 | <span·class="go">2000-01-08··0.113648··1.249281··1.478427··0.000000··0.524988··2.239990</span> |
835 | <span·class="go">2000-01-09··0.404705··1.540338··0.577046··2.055473··1.715002··0.000000</span> | 841 | <span·class="go">2000-01-09··0.404705··1.540338··0.577046··2.055473··1.715002··0.000000</span> |
836 | <span·class="go">2000-01-10··1.039268··0.096364··0.370647··1.107780··1.157892··0.557110</span> | 842 | <span·class="go">2000-01-10··1.039268··0.096364··0.370647··1.107780··1.157892··0.557110</span> |
843 | <span·class="go">[10·rows·x·6·columns]</span> | ||
837 | </pre></div> | 844 | </pre></div> |
838 | </div> | 845 | </div> |
839 | <p>When·presented·with·mixed·dtypes·that·cannot·be·aggregated,·<code·class="docutils·literal·notranslate"><span·class="pre">.agg()</span></code>·will·only·take·the·valid | 846 | <p>When·presented·with·mixed·dtypes·that·cannot·be·aggregated,·<code·class="docutils·literal·notranslate"><span·class="pre">.agg()</span></code>·will·only·take·the·valid |
840 | aggregations.·This·is·similar·to·how·groupby·<code·class="docutils·literal·notranslate"><span·class="pre">.agg()</span></code>·works.·(<a·class="extlink-issue·reference·external"·href="https://github.com/pandas-dev/pandas/issues/15015">GH·15015</a>)</p> | 847 | aggregations.·This·is·similar·to·how·groupby·<code·class="docutils·literal·notranslate"><span·class="pre">.agg()</span></code>·works.·(<a·class="extlink-issue·reference·external"·href="https://github.com/pandas-dev/pandas/issues/15015">GH·15015</a>)</p> |
841 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[8]:·</span><span·class="n">df</span>·<span·class="o">=</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">DataFrame</span><span·class="p">({</span><span·class="s1">'A'</span><span·class="p">:</span>·<span·class="p">[</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">2</span><span·class="p">,</span>·<span·class="mi">3</span><span·class="p">],</span> | 848 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[8]:·</span><span·class="n">df</span>·<span·class="o">=</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">DataFrame</span><span·class="p">({</span><span·class="s1">'A'</span><span·class="p">:</span>·<span·class="p">[</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">2</span><span·class="p">,</span>·<span·class="mi">3</span><span·class="p">],</span> |
842 | <span·class="gp">···...:·</span>···················<span·class="s1">'B'</span><span·class="p">:</span>·<span·class="p">[</span><span·class="mf">1.</span><span·class="p">,</span>·<span·class="mf">2.</span><span·class="p">,</span>·<span·class="mf">3.</span><span·class="p">],</span> | 849 | <span·class="gp">···...:·</span>···················<span·class="s1">'B'</span><span·class="p">:</span>·<span·class="p">[</span><span·class="mf">1.</span><span·class="p">,</span>·<span·class="mf">2.</span><span·class="p">,</span>·<span·class="mf">3.</span><span·class="p">],</span> |
843 | <span·class="gp">···...:·</span>···················<span·class="s1">'C'</span><span·class="p">:</span>·<span·class="p">[</span><span·class="s1">'foo'</span><span·class="p">,</span>·<span·class="s1">'bar'</span><span·class="p">,</span>·<span·class="s1">'baz'</span><span·class="p">],</span> | 850 | <span·class="gp">···...:·</span>···················<span·class="s1">'C'</span><span·class="p">:</span>·<span·class="p">[</span><span·class="s1">'foo'</span><span·class="p">,</span>·<span·class="s1">'bar'</span><span·class="p">,</span>·<span·class="s1">'baz'</span><span·class="p">],</span> |
Offset 846, 15 lines modified | Offset 854, 15 lines modified | ||
846 | <span·class="gp">In·[9]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">dtypes</span> | 854 | <span·class="gp">In·[9]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">dtypes</span> |
847 | <span·class="gh">Out[9]:·</span> | 855 | <span·class="gh">Out[9]:·</span> |
848 | <span·class="go">A·············int64</span> | 856 | <span·class="go">A·············int64</span> |
849 | <span·class="go">B···········float64</span> | 857 | <span·class="go">B···········float64</span> |
850 | <span·class="go">C············object</span> | 858 | <span·class="go">C············object</span> |
851 | <span·class="go">D····datetime64[ns]</span> | 859 | <span·class="go">D····datetime64[ns]</span> |
852 | <span·class="go">dtype:·object</span> | 860 | <span·class="go">Length:·4,·dtype:·object</span> |
853 | </pre></div> | 861 | </pre></div> |
854 | </div> | 862 | </div> |
855 | <div·class="highlight-python·notranslate"><div·class="highlight"><pre><span></span><span·class="n">In</span>·<span·class="p">[</span><span·class="mi">10</span><span·class="p">]:</span>·<span·class="n">df</span><span·class="o">.</span><span·class="n">agg</span><span·class="p">([</span><span·class="s1">'min'</span><span·class="p">,</span>·<span·class="s1">'sum'</span><span·class="p">])</span> | 863 | <div·class="highlight-python·notranslate"><div·class="highlight"><pre><span></span><span·class="n">In</span>·<span·class="p">[</span><span·class="mi">10</span><span·class="p">]:</span>·<span·class="n">df</span><span·class="o">.</span><span·class="n">agg</span><span·class="p">([</span><span·class="s1">'min'</span><span·class="p">,</span>·<span·class="s1">'sum'</span><span·class="p">])</span> |
856 | <span·class="n">Out</span><span·class="p">[</span><span·class="mi">10</span><span·class="p">]:</span> | 864 | <span·class="n">Out</span><span·class="p">[</span><span·class="mi">10</span><span·class="p">]:</span> |
857 | ·····<span·class="n">A</span>····<span·class="n">B</span>··········<span·class="n">C</span>··········<span·class="n">D</span> | 865 | ·····<span·class="n">A</span>····<span·class="n">B</span>··········<span·class="n">C</span>··········<span·class="n">D</span> |
858 | <span·class="nb">min</span>··<span·class="mi">1</span>··<span·class="mf">1.0</span>········<span·class="n">bar</span>·<span·class="mi">2013</span><span·class="o">-</span><span·class="mi">01</span><span·class="o">-</span><span·class="mi">01</span> | 866 | <span·class="nb">min</span>··<span·class="mi">1</span>··<span·class="mf">1.0</span>········<span·class="n">bar</span>·<span·class="mi">2013</span><span·class="o">-</span><span·class="mi">01</span><span·class="o">-</span><span·class="mi">01</span> |
859 | <span·class="nb">sum</span>··<span·class="mi">6</span>··<span·class="mf">6.0</span>··<span·class="n">foobarbaz</span>········<span·class="n">NaT</span> | 867 | <span·class="nb">sum</span>··<span·class="mi">6</span>··<span·class="mf">6.0</span>··<span·class="n">foobarbaz</span>········<span·class="n">NaT</span> |
Offset 867, 21 lines modified | Offset 875, 21 lines modified | ||
867 | fixed-width·text·files·and·<a·class="reference·internal"·href="../reference/api/pandas.read_excel.html#pandas.read_excel"·title="pandas.read_excel"><code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">read_excel()</span></code></a>·for·parsing·Excel·files,·now·accept·the·<code·class="docutils·literal·notranslate"><span·class="pre">dtype</span></code>·keyword·argument·for·specifying·the·types·of·specific·columns·(<a·class="extlink-issue·reference·external"·href="https://github.com/pandas-dev/pandas/issues/14295">GH·14295</a>).·See·the·<a·class="reference·internal"·href="../user_guide/io.html#io-dtypes"><span·class="std·std-ref">io·docs</span></a>·for·more·information.</p> | 875 | fixed-width·text·files·and·<a·class="reference·internal"·href="../reference/api/pandas.read_excel.html#pandas.read_excel"·title="pandas.read_excel"><code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">read_excel()</span></code></a>·for·parsing·Excel·files,·now·accept·the·<code·class="docutils·literal·notranslate"><span·class="pre">dtype</span></code>·keyword·argument·for·specifying·the·types·of·specific·columns·(<a·class="extlink-issue·reference·external"·href="https://github.com/pandas-dev/pandas/issues/14295">GH·14295</a>).·See·the·<a·class="reference·internal"·href="../user_guide/io.html#io-dtypes"><span·class="std·std-ref">io·docs</span></a>·for·more·information.</p> |
868 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[10]:·</span><span·class="n">data</span>·<span·class="o">=</span>·<span·class="s2">"a··b</span><span·class="se">\n</span><span·class="s2">1··2</span><span·class="se">\n</span><span·class="s2">3··4"</span> | 876 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[10]:·</span><span·class="n">data</span>·<span·class="o">=</span>·<span·class="s2">"a··b</span><span·class="se">\n</span><span·class="s2">1··2</span><span·class="se">\n</span><span·class="s2">3··4"</span> |
869 | <span·class="gp">In·[11]:·</span><span·class="n">pd</span><span·class="o">.</span><span·class="n">read_fwf</span><span·class="p">(</span><span·class="n">StringIO</span><span·class="p">(</span><span·class="n">data</span><span·class="p">))</span><span·class="o">.</span><span·class="n">dtypes</span> | 877 | <span·class="gp">In·[11]:·</span><span·class="n">pd</span><span·class="o">.</span><span·class="n">read_fwf</span><span·class="p">(</span><span·class="n">StringIO</span><span·class="p">(</span><span·class="n">data</span><span·class="p">))</span><span·class="o">.</span><span·class="n">dtypes</span> |
870 | <span·class="gh">Out[11]:·</span> | 878 | <span·class="gh">Out[11]:·</span> |
871 | <span·class="go">a····int64</span> | 879 | <span·class="go">a····int64</span> |
872 | <span·class="go">b····int64</span> | 880 | <span·class="go">b····int64</span> |
873 | <span·class="go">dtype:·object</span> | 881 | <span·class="go">Length:·2,·dtype:·object</span> |
874 | <span·class="gp">In·[12]:·</span><span·class="n">pd</span><span·class="o">.</span><span·class="n">read_fwf</span><span·class="p">(</span><span·class="n">StringIO</span><span·class="p">(</span><span·class="n">data</span><span·class="p">),</span>·<span·class="n">dtype</span><span·class="o">=</span><span·class="p">{</span><span·class="s1">'a'</span><span·class="p">:</span>·<span·class="s1">'float64'</span><span·class="p">,</span>·<span·class="s1">'b'</span><span·class="p">:</span>·<span·class="s1">'object'</span><span·class="p">})</span><span·class="o">.</span><span·class="n">dtypes</span> | 882 | <span·class="gp">In·[12]:·</span><span·class="n">pd</span><span·class="o">.</span><span·class="n">read_fwf</span><span·class="p">(</span><span·class="n">StringIO</span><span·class="p">(</span><span·class="n">data</span><span·class="p">),</span>·<span·class="n">dtype</span><span·class="o">=</span><span·class="p">{</span><span·class="s1">'a'</span><span·class="p">:</span>·<span·class="s1">'float64'</span><span·class="p">,</span>·<span·class="s1">'b'</span><span·class="p">:</span>·<span·class="s1">'object'</span><span·class="p">})</span><span·class="o">.</span><span·class="n">dtypes</span> |
875 | <span·class="gh">Out[12]:·</span> | 883 | <span·class="gh">Out[12]:·</span> |
876 | <span·class="go">a····float64</span> | 884 | <span·class="go">a····float64</span> |
877 | <span·class="go">b·····object</span> | 885 | <span·class="go">b·····object</span> |
878 | <span·class="go">dtype:·object</span> | 886 | <span·class="go">Length:·2,·dtype:·object</span> |
879 | </pre></div> | 887 | </pre></div> |
880 | </div> | 888 | </div> |
881 | </section> | 889 | </section> |
882 | <section·id="method-to-datetime-has-gained-an-origin-parameter"> | 890 | <section·id="method-to-datetime-has-gained-an-origin-parameter"> |
883 | <span·id="whatsnew-0120-enhancements-datetime-origin"></span><h3>Method·<code·class="docutils·literal·notranslate"><span·class="pre">.to_datetime()</span></code>·has·gained·an·<code·class="docutils·literal·notranslate"><span·class="pre">origin</span></code>·parameter<a·class="headerlink"·href="#method-to-datetime-has-gained-an-origin-parameter"·title="Link·to·this·heading">#</a></h3> | 891 | <span·id="whatsnew-0120-enhancements-datetime-origin"></span><h3>Method·<code·class="docutils·literal·notranslate"><span·class="pre">.to_datetime()</span></code>·has·gained·an·<code·class="docutils·literal·notranslate"><span·class="pre">origin</span></code>·parameter<a·class="headerlink"·href="#method-to-datetime-has-gained-an-origin-parameter"·title="Link·to·this·heading">#</a></h3> |
884 | <p><a·class="reference·internal"·href="../reference/api/pandas.to_datetime.html#pandas.to_datetime"·title="pandas.to_datetime"><code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">to_datetime()</span></code></a>·has·gained·a·new·parameter,·<code·class="docutils·literal·notranslate"><span·class="pre">origin</span></code>,·to·define·a·reference·date | 892 | <p><a·class="reference·internal"·href="../reference/api/pandas.to_datetime.html#pandas.to_datetime"·title="pandas.to_datetime"><code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">to_datetime()</span></code></a>·has·gained·a·new·parameter,·<code·class="docutils·literal·notranslate"><span·class="pre">origin</span></code>,·to·define·a·reference·date |
885 | from·where·to·compute·the·resulting·timestamps·when·parsing·numerical·values·with·a·specific·<code·class="docutils·literal·notranslate"><span·class="pre">unit</span></code>·specified.·(<a·class="extlink-issue·reference·external"·href="https://github.com/pandas-dev/pandas/issues/11276">GH·11276</a>,·<a·class="extlink-issue·reference·external"·href="https://github.com/pandas-dev/pandas/issues/11745">GH·11745</a>)</p> | 893 | from·where·to·compute·the·resulting·timestamps·when·parsing·numerical·values·with·a·specific·<code·class="docutils·literal·notranslate"><span·class="pre">unit</span></code>·specified.·(<a·class="extlink-issue·reference·external"·href="https://github.com/pandas-dev/pandas/issues/11276">GH·11276</a>,·<a·class="extlink-issue·reference·external"·href="https://github.com/pandas-dev/pandas/issues/11745">GH·11745</a>)</p> |
Offset 920, 24 lines modified | Offset 928, 28 lines modified | ||
920 | <span·class="go">baz···one·····1··2</span> | 928 | <span·class="go">baz···one·····1··2</span> |
921 | <span·class="go">······two·····1··3</span> | 929 | <span·class="go">······two·····1··3</span> |
922 | <span·class="go">foo···one·····2··4</span> | 930 | <span·class="go">foo···one·····2··4</span> |
923 | <span·class="go">······two·····2··5</span> | 931 | <span·class="go">······two·····2··5</span> |
924 | <span·class="go">qux···one·····3··6</span> | 932 | <span·class="go">qux···one·····3··6</span> |
925 | <span·class="go">······two·····3··7</span> | 933 | <span·class="go">······two·····3··7</span> |
934 | <span·class="go">[8·rows·x·2·columns]</span> | ||
926 | <span·class="gp">In·[19]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">groupby</span><span·class="p">([</span><span·class="s1">'second'</span><span·class="p">,</span>·<span·class="s1">'A'</span><span·class="p">])</span><span·class="o">.</span><span·class="n">sum</span><span·class="p">()</span> | 935 | <span·class="gp">In·[19]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">groupby</span><span·class="p">([</span><span·class="s1">'second'</span><span·class="p">,</span>·<span·class="s1">'A'</span><span·class="p">])</span><span·class="o">.</span><span·class="n">sum</span><span·class="p">()</span> |
927 | <span·class="gh">Out[19]:·</span> | 936 | <span·class="gh">Out[19]:·</span> |
928 | <span·class="go">··········B</span> | 937 | <span·class="go">··········B</span> |
929 | <span·class="go">second·A···</span> | 938 | <span·class="go">second·A···</span> |
930 | <span·class="go">one····1··2</span> | 939 | <span·class="go">one····1··2</span> |
931 | <span·class="go">·······2··4</span> | 940 | <span·class="go">·······2··4</span> |
932 | <span·class="go">·······3··6</span> | 941 | <span·class="go">·······3··6</span> |
933 | <span·class="go">two····1··4</span> | 942 | <span·class="go">two····1··4</span> |
934 | <span·class="go">·······2··5</span> | 943 | <span·class="go">·······2··5</span> |
935 | <span·class="go">·······3··7</span> | 944 | <span·class="go">·······3··7</span> |
945 | <span·class="go">[6·rows·x·1·columns]</span> | ||
936 | </pre></div> | 946 | </pre></div> |
Max diff block lines reached; 42051/54785 bytes (76.76%) of diff not shown. |
Offset 235, 39 lines modified | Offset 235, 45 lines modified | ||
235 | 2000-01-04·······NaN·······NaN·······NaN | 235 | 2000-01-04·······NaN·······NaN·······NaN |
236 | 2000-01-05·······NaN·······NaN·······NaN | 236 | 2000-01-05·······NaN·······NaN·······NaN |
237 | 2000-01-06·······NaN·······NaN·······NaN | 237 | 2000-01-06·······NaN·······NaN·······NaN |
238 | 2000-01-07·······NaN·······NaN·······NaN | 238 | 2000-01-07·······NaN·······NaN·······NaN |
239 | 2000-01-08··0.113648·-1.478427··0.524988 | 239 | 2000-01-08··0.113648·-1.478427··0.524988 |
240 | 2000-01-09··0.404705··0.577046·-1.715002 | 240 | 2000-01-09··0.404705··0.577046·-1.715002 |
241 | 2000-01-10·-1.039268·-0.370647·-1.157892 | 241 | 2000-01-10·-1.039268·-0.370647·-1.157892 |
242 | [10·rows·x·3·columns] | ||
242 | One·can·operate·using·string·function·names,·callables,·lists,·or·dictionaries | 243 | One·can·operate·using·string·function·names,·callables,·lists,·or·dictionaries |
243 | of·these. | 244 | of·these. |
244 | Using·a·single·function·is·equivalent·to·.apply. | 245 | Using·a·single·function·is·equivalent·to·.apply. |
245 | In·[4]:·df.agg('sum') | 246 | In·[4]:·df.agg('sum') |
246 | Out[4]: | 247 | Out[4]: |
247 | A···-1.068226 | 248 | A···-1.068226 |
248 | B···-1.387015 | 249 | B···-1.387015 |
249 | C···-4.892029 | 250 | C···-4.892029 |
250 | dtype:·float64 | 251 | Length:·3,·dtype:·float64 |
251 | Multiple·aggregations·with·a·list·of·functions. | 252 | Multiple·aggregations·with·a·list·of·functions. |
252 | In·[5]:·df.agg(['sum',·'min']) | 253 | In·[5]:·df.agg(['sum',·'min']) |
253 | Out[5]: | 254 | Out[5]: |
254 | ············A·········B·········C | 255 | ············A·········B·········C |
255 | sum·-1.068226·-1.387015·-4.892029 | 256 | sum·-1.068226·-1.387015·-4.892029 |
256 | min·-1.135632·-1.478427·-1.715002 | 257 | min·-1.135632·-1.478427·-1.715002 |
258 | [2·rows·x·3·columns] | ||
257 | Using·a·dict·provides·the·ability·to·apply·specific·aggregations·per·column. | 259 | Using·a·dict·provides·the·ability·to·apply·specific·aggregations·per·column. |
258 | You·will·get·a·matrix-like·output·of·all·of·the·aggregators.·The·output·has·one | 260 | You·will·get·a·matrix-like·output·of·all·of·the·aggregators.·The·output·has·one |
259 | column·per·unique·function.·Those·functions·applied·to·a·particular·column·will | 261 | column·per·unique·function.·Those·functions·applied·to·a·particular·column·will |
260 | be·NaN: | 262 | be·NaN: |
261 | In·[6]:·df.agg({'A':·['sum',·'min'],·'B':·['min',·'max']}) | 263 | In·[6]:·df.agg({'A':·['sum',·'min'],·'B':·['min',·'max']}) |
262 | Out[6]: | 264 | Out[6]: |
263 | ············A·········B | 265 | ············A·········B |
264 | sum·-1.068226·······NaN | 266 | sum·-1.068226·······NaN |
265 | min·-1.135632·-1.478427 | 267 | min·-1.135632·-1.478427 |
266 | max·······NaN··1.212112 | 268 | max·······NaN··1.212112 |
269 | [3·rows·x·2·columns] | ||
267 | The·API·also·supports·a·.transform()·function·for·broadcasting·results. | 270 | The·API·also·supports·a·.transform()·function·for·broadcasting·results. |
268 | In·[7]:·df.transform(['abs',·lambda·x:·x·-·x.min()]) | 271 | In·[7]:·df.transform(['abs',·lambda·x:·x·-·x.min()]) |
269 | Out[7]: | 272 | Out[7]: |
270 | ···················A···················B···················C | 273 | ···················A···················B···················C |
271 | ·················abs··<lambda>·······abs··<lambda>·······abs··<lambda> | 274 | ·················abs··<lambda>·······abs··<lambda>·······abs··<lambda> |
272 | 2000-01-01··0.469112··1.604745··0.282863··1.195563··1.509059··0.205944 | 275 | 2000-01-01··0.469112··1.604745··0.282863··1.195563··1.509059··0.205944 |
273 | 2000-01-02··1.135632··0.000000··1.212112··2.690539··0.173215··1.541787 | 276 | 2000-01-02··1.135632··0.000000··1.212112··2.690539··0.173215··1.541787 |
Offset 275, 14 lines modified | Offset 281, 16 lines modified | ||
275 | 2000-01-04·······NaN·······NaN·······NaN·······NaN·······NaN·······NaN | 281 | 2000-01-04·······NaN·······NaN·······NaN·······NaN·······NaN·······NaN |
276 | 2000-01-05·······NaN·······NaN·······NaN·······NaN·······NaN·······NaN | 282 | 2000-01-05·······NaN·······NaN·······NaN·······NaN·······NaN·······NaN |
277 | 2000-01-06·······NaN·······NaN·······NaN·······NaN·······NaN·······NaN | 283 | 2000-01-06·······NaN·······NaN·······NaN·······NaN·······NaN·······NaN |
278 | 2000-01-07·······NaN·······NaN·······NaN·······NaN·······NaN·······NaN | 284 | 2000-01-07·······NaN·······NaN·······NaN·······NaN·······NaN·······NaN |
279 | 2000-01-08··0.113648··1.249281··1.478427··0.000000··0.524988··2.239990 | 285 | 2000-01-08··0.113648··1.249281··1.478427··0.000000··0.524988··2.239990 |
280 | 2000-01-09··0.404705··1.540338··0.577046··2.055473··1.715002··0.000000 | 286 | 2000-01-09··0.404705··1.540338··0.577046··2.055473··1.715002··0.000000 |
281 | 2000-01-10··1.039268··0.096364··0.370647··1.107780··1.157892··0.557110 | 287 | 2000-01-10··1.039268··0.096364··0.370647··1.107780··1.157892··0.557110 |
288 | [10·rows·x·6·columns] | ||
282 | When·presented·with·mixed·dtypes·that·cannot·be·aggregated,·.agg()·will·only | 289 | When·presented·with·mixed·dtypes·that·cannot·be·aggregated,·.agg()·will·only |
283 | take·the·valid·aggregations.·This·is·similar·to·how·groupby·.agg()·works.·(_\x8G_\x8H | 290 | take·the·valid·aggregations.·This·is·similar·to·how·groupby·.agg()·works.·(_\x8G_\x8H |
284 | _\x81_\x85_\x80_\x81_\x85) | 291 | _\x81_\x85_\x80_\x81_\x85) |
285 | In·[8]:·df·=·pd.DataFrame({'A':·[1,·2,·3], | 292 | In·[8]:·df·=·pd.DataFrame({'A':·[1,·2,·3], |
286 | ···...:····················'B':·[1.,·2.,·3.], | 293 | ···...:····················'B':·[1.,·2.,·3.], |
287 | ···...:····················'C':·['foo',·'bar',·'baz'], | 294 | ···...:····················'C':·['foo',·'bar',·'baz'], |
288 | ···...:····················'D':·pd.date_range('20130101',·periods=3)}) | 295 | ···...:····················'D':·pd.date_range('20130101',·periods=3)}) |
Offset 290, 15 lines modified | Offset 298, 15 lines modified | ||
290 | In·[9]:·df.dtypes | 298 | In·[9]:·df.dtypes |
291 | Out[9]: | 299 | Out[9]: |
292 | A·············int64 | 300 | A·············int64 |
293 | B···········float64 | 301 | B···········float64 |
294 | C············object | 302 | C············object |
295 | D····datetime64[ns] | 303 | D····datetime64[ns] |
296 | dtype:·object | 304 | Length:·4,·dtype:·object |
297 | In·[10]:·df.agg(['min',·'sum']) | 305 | In·[10]:·df.agg(['min',·'sum']) |
298 | Out[10]: | 306 | Out[10]: |
299 | ·····A····B··········C··········D | 307 | ·····A····B··········C··········D |
300 | min··1··1.0········bar·2013-01-01 | 308 | min··1··1.0········bar·2013-01-01 |
301 | sum··6··6.0··foobarbaz········NaT | 309 | sum··6··6.0··foobarbaz········NaT |
302 | *\x8**\x8**\x8**\x8*·K\x8Ke\x8ey\x8yw\x8wo\x8or\x8rd\x8d·a\x8ar\x8rg\x8gu\x8um\x8me\x8en\x8nt\x8t·d\x8dt\x8ty\x8yp\x8pe\x8e·f\x8fo\x8or\x8r·d\x8da\x8at\x8ta\x8a·I\x8IO\x8O_\x8#\x8#·*\x8**\x8**\x8**\x8* | 310 | *\x8**\x8**\x8**\x8*·K\x8Ke\x8ey\x8yw\x8wo\x8or\x8rd\x8d·a\x8ar\x8rg\x8gu\x8um\x8me\x8en\x8nt\x8t·d\x8dt\x8ty\x8yp\x8pe\x8e·f\x8fo\x8or\x8r·d\x8da\x8at\x8ta\x8a·I\x8IO\x8O_\x8#\x8#·*\x8**\x8**\x8**\x8* |
303 | The·'python'·engine·for·_\x8r_\x8e_\x8a_\x8d_\x8__\x8c_\x8s_\x8v_\x8(_\x8),·as·well·as·the·_\x8r_\x8e_\x8a_\x8d_\x8__\x8f_\x8w_\x8f_\x8(_\x8)·function·for | 311 | The·'python'·engine·for·_\x8r_\x8e_\x8a_\x8d_\x8__\x8c_\x8s_\x8v_\x8(_\x8),·as·well·as·the·_\x8r_\x8e_\x8a_\x8d_\x8__\x8f_\x8w_\x8f_\x8(_\x8)·function·for |
Offset 307, 22 lines modified | Offset 315, 22 lines modified | ||
307 | (_\x8G_\x8H_\x8·_\x81_\x84_\x82_\x89_\x85).·See·the·_\x8i_\x8o_\x8·_\x8d_\x8o_\x8c_\x8s·for·more·information. | 315 | (_\x8G_\x8H_\x8·_\x81_\x84_\x82_\x89_\x85).·See·the·_\x8i_\x8o_\x8·_\x8d_\x8o_\x8c_\x8s·for·more·information. |
308 | In·[10]:·data·=·"a··b\n1··2\n3··4" | 316 | In·[10]:·data·=·"a··b\n1··2\n3··4" |
309 | In·[11]:·pd.read_fwf(StringIO(data)).dtypes | 317 | In·[11]:·pd.read_fwf(StringIO(data)).dtypes |
310 | Out[11]: | 318 | Out[11]: |
311 | a····int64 | 319 | a····int64 |
312 | b····int64 | 320 | b····int64 |
313 | dtype:·object | 321 | Length:·2,·dtype:·object |
314 | In·[12]:·pd.read_fwf(StringIO(data),·dtype={'a':·'float64',·'b': | 322 | In·[12]:·pd.read_fwf(StringIO(data),·dtype={'a':·'float64',·'b': |
315 | 'object'}).dtypes | 323 | 'object'}).dtypes |
316 | Out[12]: | 324 | Out[12]: |
317 | a····float64 | 325 | a····float64 |
318 | b·····object | 326 | b·····object |
319 | dtype:·object | 327 | Length:·2,·dtype:·object |
320 | *\x8**\x8**\x8**\x8*·M\x8Me\x8et\x8th\x8ho\x8od\x8d·.\x8.t\x8to\x8o_\x8_d\x8da\x8at\x8te\x8et\x8ti\x8im\x8me\x8e(\x8()\x8)·h\x8ha\x8as\x8s·g\x8ga\x8ai\x8in\x8ne\x8ed\x8d·a\x8an\x8n·o\x8or\x8ri\x8ig\x8gi\x8in\x8n·p\x8pa\x8ar\x8ra\x8am\x8me\x8et\x8te\x8er\x8r_\x8#\x8#·*\x8**\x8**\x8**\x8* | 328 | *\x8**\x8**\x8**\x8*·M\x8Me\x8et\x8th\x8ho\x8od\x8d·.\x8.t\x8to\x8o_\x8_d\x8da\x8at\x8te\x8et\x8ti\x8im\x8me\x8e(\x8()\x8)·h\x8ha\x8as\x8s·g\x8ga\x8ai\x8in\x8ne\x8ed\x8d·a\x8an\x8n·o\x8or\x8ri\x8ig\x8gi\x8in\x8n·p\x8pa\x8ar\x8ra\x8am\x8me\x8et\x8te\x8er\x8r_\x8#\x8#·*\x8**\x8**\x8**\x8* |
321 | _\x8t_\x8o_\x8__\x8d_\x8a_\x8t_\x8e_\x8t_\x8i_\x8m_\x8e_\x8(_\x8)·has·gained·a·new·parameter,·origin,·to·define·a·reference·date | 329 | _\x8t_\x8o_\x8__\x8d_\x8a_\x8t_\x8e_\x8t_\x8i_\x8m_\x8e_\x8(_\x8)·has·gained·a·new·parameter,·origin,·to·define·a·reference·date |
322 | from·where·to·compute·the·resulting·timestamps·when·parsing·numerical·values | 330 | from·where·to·compute·the·resulting·timestamps·when·parsing·numerical·values |
323 | with·a·specific·unit·specified.·(_\x8G_\x8H_\x8·_\x81_\x81_\x82_\x87_\x86,·_\x8G_\x8H_\x8·_\x81_\x81_\x87_\x84_\x85) | 331 | with·a·specific·unit·specified.·(_\x8G_\x8H_\x8·_\x81_\x81_\x82_\x87_\x86,·_\x8G_\x8H_\x8·_\x81_\x81_\x87_\x84_\x85) |
324 | For·example,·with·1960-01-01·as·the·starting·date: | 332 | For·example,·with·1960-01-01·as·the·starting·date: |
325 | In·[13]:·pd.to_datetime([1,·2,·3],·unit='D',·origin=pd.Timestamp('1960-01-01')) | 333 | In·[13]:·pd.to_datetime([1,·2,·3],·unit='D',·origin=pd.Timestamp('1960-01-01')) |
326 | Out[13]:·DatetimeIndex(['1960-01-02',·'1960-01-03',·'1960-01-04'], | 334 | Out[13]:·DatetimeIndex(['1960-01-02',·'1960-01-03',·'1960-01-04'], |
Offset 358, 24 lines modified | Offset 366, 28 lines modified | ||
358 | baz···one·····1··2 | 366 | baz···one·····1··2 |
359 | ······two·····1··3 | 367 | ······two·····1··3 |
360 | foo···one·····2··4 | 368 | foo···one·····2··4 |
361 | ······two·····2··5 | 369 | ······two·····2··5 |
362 | qux···one·····3··6 | 370 | qux···one·····3··6 |
363 | ······two·····3··7 | 371 | ······two·····3··7 |
372 | [8·rows·x·2·columns] | ||
364 | In·[19]:·df.groupby(['second',·'A']).sum() | 373 | In·[19]:·df.groupby(['second',·'A']).sum() |
365 | Out[19]: | 374 | Out[19]: |
366 | ··········B | 375 | ··········B |
367 | second·A | 376 | second·A |
368 | one····1··2 | 377 | one····1··2 |
369 | ·······2··4 | 378 | ·······2··4 |
370 | ·······3··6 | 379 | ·······3··6 |
371 | two····1··4 | 380 | two····1··4 |
372 | ·······2··5 | 381 | ·······2··5 |
373 | ·······3··7 | 382 | ·······3··7 |
383 | [6·rows·x·1·columns] | ||
374 | *\x8**\x8**\x8**\x8*·B\x8Be\x8et\x8tt\x8te\x8er\x8r·s\x8su\x8up\x8pp\x8po\x8or\x8rt\x8t·f\x8fo\x8or\x8r·c\x8co\x8om\x8mp\x8pr\x8re\x8es\x8ss\x8se\x8ed\x8d·U\x8UR\x8RL\x8Ls\x8s·i\x8in\x8n·r\x8re\x8ea\x8ad\x8d_\x8_c\x8cs\x8sv\x8v_\x8#\x8#·*\x8**\x8**\x8**\x8* | 384 | *\x8**\x8**\x8**\x8*·B\x8Be\x8et\x8tt\x8te\x8er\x8r·s\x8su\x8up\x8pp\x8po\x8or\x8rt\x8t·f\x8fo\x8or\x8r·c\x8co\x8om\x8mp\x8pr\x8re\x8es\x8ss\x8se\x8ed\x8d·U\x8UR\x8RL\x8Ls\x8s·i\x8in\x8n·r\x8re\x8ea\x8ad\x8d_\x8_c\x8cs\x8sv\x8v_\x8#\x8#·*\x8**\x8**\x8**\x8* |
375 | The·compression·code·was·refactored·(_\x8G_\x8H_\x8·_\x81_\x82_\x86_\x88_\x88).·As·a·result,·reading·dataframes | 385 | The·compression·code·was·refactored·(_\x8G_\x8H_\x8·_\x81_\x82_\x86_\x88_\x88).·As·a·result,·reading·dataframes |
376 | from·URLs·in·_\x8r_\x8e_\x8a_\x8d_\x8__\x8c_\x8s_\x8v_\x8(_\x8)·or·_\x8r_\x8e_\x8a_\x8d_\x8__\x8t_\x8a_\x8b_\x8l_\x8e_\x8(_\x8)·now·supports·additional·compression | 386 | from·URLs·in·_\x8r_\x8e_\x8a_\x8d_\x8__\x8c_\x8s_\x8v_\x8(_\x8)·or·_\x8r_\x8e_\x8a_\x8d_\x8__\x8t_\x8a_\x8b_\x8l_\x8e_\x8(_\x8)·now·supports·additional·compression |
377 | methods:·xz,·bz2,·and·zip·(_\x8G_\x8H_\x8·_\x81_\x84_\x85_\x87_\x80).·Previously,·only·gzip·compression·was | 387 | methods:·xz,·bz2,·and·zip·(_\x8G_\x8H_\x8·_\x81_\x84_\x85_\x87_\x80).·Previously,·only·gzip·compression·was |
Max diff block lines reached; 15104/20263 bytes (74.54%) of diff not shown. |
Offset 757, 37 lines modified | Offset 757, 37 lines modified | ||
757 | <span·class="gp">···...:·</span> | 757 | <span·class="gp">···...:·</span> |
758 | <span·class="gp">In·[2]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">dtypes</span> | 758 | <span·class="gp">In·[2]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">dtypes</span> |
759 | <span·class="gh">Out[2]:·</span> | 759 | <span·class="gh">Out[2]:·</span> |
760 | <span·class="go">A·····int64</span> | 760 | <span·class="go">A·····int64</span> |
761 | <span·class="go">B····object</span> | 761 | <span·class="go">B····object</span> |
762 | <span·class="go">C····object</span> | 762 | <span·class="go">C····object</span> |
763 | <span·class="go">dtype:·object</span> | 763 | <span·class="go">Length:·3,·dtype:·object</span> |
764 | <span·class="gp">In·[3]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">infer_objects</span><span·class="p">()</span><span·class="o">.</span><span·class="n">dtypes</span> | 764 | <span·class="gp">In·[3]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">infer_objects</span><span·class="p">()</span><span·class="o">.</span><span·class="n">dtypes</span> |
765 | <span·class="gh">Out[3]:·</span> | 765 | <span·class="gh">Out[3]:·</span> |
766 | <span·class="go">A·····int64</span> | 766 | <span·class="go">A·····int64</span> |
767 | <span·class="go">B·····int64</span> | 767 | <span·class="go">B·····int64</span> |
768 | <span·class="go">C····object</span> | 768 | <span·class="go">C····object</span> |
769 | <span·class="go">dtype:·object</span> | 769 | <span·class="go">Length:·3,·dtype:·object</span> |
770 | </pre></div> | 770 | </pre></div> |
771 | </div> | 771 | </div> |
772 | <p>Note·that·column·<code·class="docutils·literal·notranslate"><span·class="pre">'C'</span></code>·was·not·converted·-·only·scalar·numeric·types | 772 | <p>Note·that·column·<code·class="docutils·literal·notranslate"><span·class="pre">'C'</span></code>·was·not·converted·-·only·scalar·numeric·types |
773 | will·be·converted·to·a·new·type.··Other·types·of·conversion·should·be·accomplished | 773 | will·be·converted·to·a·new·type.··Other·types·of·conversion·should·be·accomplished |
774 | using·the·<a·class="reference·internal"·href="../reference/api/pandas.to_numeric.html#pandas.to_numeric"·title="pandas.to_numeric"><code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">to_numeric()</span></code></a>·function·(or·<a·class="reference·internal"·href="../reference/api/pandas.to_datetime.html#pandas.to_datetime"·title="pandas.to_datetime"><code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">to_datetime()</span></code></a>,·<a·class="reference·internal"·href="../reference/api/pandas.to_timedelta.html#pandas.to_timedelta"·title="pandas.to_timedelta"><code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">to_timedelta()</span></code></a>).</p> | 774 | using·the·<a·class="reference·internal"·href="../reference/api/pandas.to_numeric.html#pandas.to_numeric"·title="pandas.to_numeric"><code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">to_numeric()</span></code></a>·function·(or·<a·class="reference·internal"·href="../reference/api/pandas.to_datetime.html#pandas.to_datetime"·title="pandas.to_datetime"><code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">to_datetime()</span></code></a>,·<a·class="reference·internal"·href="../reference/api/pandas.to_timedelta.html#pandas.to_timedelta"·title="pandas.to_timedelta"><code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">to_timedelta()</span></code></a>).</p> |
775 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[4]:·</span><span·class="n">df</span>·<span·class="o">=</span>·<span·class="n">df</span><span·class="o">.</span><span·class="n">infer_objects</span><span·class="p">()</span> | 775 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[4]:·</span><span·class="n">df</span>·<span·class="o">=</span>·<span·class="n">df</span><span·class="o">.</span><span·class="n">infer_objects</span><span·class="p">()</span> |
776 | <span·class="gp">In·[5]:·</span><span·class="n">df</span><span·class="p">[</span><span·class="s1">'C'</span><span·class="p">]</span>·<span·class="o">=</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">to_numeric</span><span·class="p">(</span><span·class="n">df</span><span·class="p">[</span><span·class="s1">'C'</span><span·class="p">],</span>·<span·class="n">errors</span><span·class="o">=</span><span·class="s1">'coerce'</span><span·class="p">)</span> | 776 | <span·class="gp">In·[5]:·</span><span·class="n">df</span><span·class="p">[</span><span·class="s1">'C'</span><span·class="p">]</span>·<span·class="o">=</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">to_numeric</span><span·class="p">(</span><span·class="n">df</span><span·class="p">[</span><span·class="s1">'C'</span><span·class="p">],</span>·<span·class="n">errors</span><span·class="o">=</span><span·class="s1">'coerce'</span><span·class="p">)</span> |
777 | <span·class="gp">In·[6]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">dtypes</span> | 777 | <span·class="gp">In·[6]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">dtypes</span> |
778 | <span·class="gh">Out[6]:·</span> | 778 | <span·class="gh">Out[6]:·</span> |
779 | <span·class="go">A····int64</span> | 779 | <span·class="go">A····int64</span> |
780 | <span·class="go">B····int64</span> | 780 | <span·class="go">B····int64</span> |
781 | <span·class="go">C····int64</span> | 781 | <span·class="go">C····int64</span> |
782 | <span·class="go">dtype:·object</span> | 782 | <span·class="go">Length:·3,·dtype:·object</span> |
783 | </pre></div> | 783 | </pre></div> |
784 | </div> | 784 | </div> |
785 | </section> | 785 | </section> |
786 | <section·id="improved-warnings-when-attempting-to-create-columns"> | 786 | <section·id="improved-warnings-when-attempting-to-create-columns"> |
787 | <span·id="whatsnew-0210-enhancements-attribute-access"></span><h3>Improved·warnings·when·attempting·to·create·columns<a·class="headerlink"·href="#improved-warnings-when-attempting-to-create-columns"·title="Link·to·this·heading">#</a></h3> | 787 | <span·id="whatsnew-0210-enhancements-attribute-access"></span><h3>Improved·warnings·when·attempting·to·create·columns<a·class="headerlink"·href="#improved-warnings-when-attempting-to-create-columns"·title="Link·to·this·heading">#</a></h3> |
788 | <p>New·users·are·often·puzzled·by·the·relationship·between·column·operations·and | 788 | <p>New·users·are·often·puzzled·by·the·relationship·between·column·operations·and |
789 | attribute·access·on·<code·class="docutils·literal·notranslate"><span·class="pre">DataFrame</span></code>·instances·(<a·class="extlink-issue·reference·external"·href="https://github.com/pandas-dev/pandas/issues/7175">GH·7175</a>).·One·specific | 789 | attribute·access·on·<code·class="docutils·literal·notranslate"><span·class="pre">DataFrame</span></code>·instances·(<a·class="extlink-issue·reference·external"·href="https://github.com/pandas-dev/pandas/issues/7175">GH·7175</a>).·One·specific |
Offset 820, 26 lines modified | Offset 820, 32 lines modified | ||
820 | <span·class="gp">In·[8]:·</span><span·class="n">df</span> | 820 | <span·class="gp">In·[8]:·</span><span·class="n">df</span> |
821 | <span·class="gh">Out[8]:·</span> | 821 | <span·class="gh">Out[8]:·</span> |
822 | <span·class="go">···A··B··C··D</span> | 822 | <span·class="go">···A··B··C··D</span> |
823 | <span·class="go">0··0··1··2··3</span> | 823 | <span·class="go">0··0··1··2··3</span> |
824 | <span·class="go">1··4··5··6··7</span> | 824 | <span·class="go">1··4··5··6··7</span> |
825 | <span·class="go">[2·rows·x·4·columns]</span> | ||
825 | <span·class="gp">In·[9]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">drop</span><span·class="p">([</span><span·class="s1">'B'</span><span·class="p">,</span>·<span·class="s1">'C'</span><span·class="p">],</span>·<span·class="n">axis</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">)</span> | 826 | <span·class="gp">In·[9]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">drop</span><span·class="p">([</span><span·class="s1">'B'</span><span·class="p">,</span>·<span·class="s1">'C'</span><span·class="p">],</span>·<span·class="n">axis</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">)</span> |
826 | <span·class="gh">Out[9]:·</span> | 827 | <span·class="gh">Out[9]:·</span> |
827 | <span·class="go">···A··D</span> | 828 | <span·class="go">···A··D</span> |
828 | <span·class="go">0··0··3</span> | 829 | <span·class="go">0··0··3</span> |
829 | <span·class="go">1··4··7</span> | 830 | <span·class="go">1··4··7</span> |
831 | <span·class="go">[2·rows·x·2·columns]</span> | ||
830 | <span·class="go">#·the·following·is·now·equivalent</span> | 832 | <span·class="go">#·the·following·is·now·equivalent</span> |
831 | <span·class="gp">In·[10]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">drop</span><span·class="p">(</span><span·class="n">columns</span><span·class="o">=</span><span·class="p">[</span><span·class="s1">'B'</span><span·class="p">,</span>·<span·class="s1">'C'</span><span·class="p">])</span> | 833 | <span·class="gp">In·[10]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">drop</span><span·class="p">(</span><span·class="n">columns</span><span·class="o">=</span><span·class="p">[</span><span·class="s1">'B'</span><span·class="p">,</span>·<span·class="s1">'C'</span><span·class="p">])</span> |
832 | <span·class="gh">Out[10]:·</span> | 834 | <span·class="gh">Out[10]:·</span> |
833 | <span·class="go">···A··D</span> | 835 | <span·class="go">···A··D</span> |
834 | <span·class="go">0··0··3</span> | 836 | <span·class="go">0··0··3</span> |
835 | <span·class="go">1··4··7</span> | 837 | <span·class="go">1··4··7</span> |
838 | <span·class="go">[2·rows·x·2·columns]</span> | ||
836 | </pre></div> | 839 | </pre></div> |
837 | </div> | 840 | </div> |
838 | </section> | 841 | </section> |
839 | <section·id="methods-rename-reindex-now-also-accept-axis-keyword"> | 842 | <section·id="methods-rename-reindex-now-also-accept-axis-keyword"> |
840 | <span·id="whatsnew-0210-enhancements-rename-reindex-axis"></span><h3>Methods·<code·class="docutils·literal·notranslate"><span·class="pre">rename</span></code>,·<code·class="docutils·literal·notranslate"><span·class="pre">reindex</span></code>·now·also·accept·axis·keyword<a·class="headerlink"·href="#methods-rename-reindex-now-also-accept-axis-keyword"·title="Link·to·this·heading">#</a></h3> | 843 | <span·id="whatsnew-0210-enhancements-rename-reindex-axis"></span><h3>Methods·<code·class="docutils·literal·notranslate"><span·class="pre">rename</span></code>,·<code·class="docutils·literal·notranslate"><span·class="pre">reindex</span></code>·now·also·accept·axis·keyword<a·class="headerlink"·href="#methods-rename-reindex-now-also-accept-axis-keyword"·title="Link·to·this·heading">#</a></h3> |
841 | <p>The·<a·class="reference·internal"·href="../reference/api/pandas.DataFrame.rename.html#pandas.DataFrame.rename"·title="pandas.DataFrame.rename"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">DataFrame.rename()</span></code></a>·and·<a·class="reference·internal"·href="../reference/api/pandas.DataFrame.reindex.html#pandas.DataFrame.reindex"·title="pandas.DataFrame.reindex"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">DataFrame.reindex()</span></code></a>·methods·have·gained | 844 | <p>The·<a·class="reference·internal"·href="../reference/api/pandas.DataFrame.rename.html#pandas.DataFrame.rename"·title="pandas.DataFrame.rename"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">DataFrame.rename()</span></code></a>·and·<a·class="reference·internal"·href="../reference/api/pandas.DataFrame.reindex.html#pandas.DataFrame.reindex"·title="pandas.DataFrame.reindex"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">DataFrame.reindex()</span></code></a>·methods·have·gained |
842 | the·<code·class="docutils·literal·notranslate"><span·class="pre">axis</span></code>·keyword·to·specify·the·axis·to·target·with·the·operation | 845 | the·<code·class="docutils·literal·notranslate"><span·class="pre">axis</span></code>·keyword·to·specify·the·axis·to·target·with·the·operation |
Offset 850, 52 lines modified | Offset 856, 64 lines modified | ||
850 | <span·class="gp">In·[12]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">rename</span><span·class="p">(</span><span·class="nb">str</span><span·class="o">.</span><span·class="n">lower</span><span·class="p">,</span>·<span·class="n">axis</span><span·class="o">=</span><span·class="s1">'columns'</span><span·class="p">)</span> | 856 | <span·class="gp">In·[12]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">rename</span><span·class="p">(</span><span·class="nb">str</span><span·class="o">.</span><span·class="n">lower</span><span·class="p">,</span>·<span·class="n">axis</span><span·class="o">=</span><span·class="s1">'columns'</span><span·class="p">)</span> |
851 | <span·class="gh">Out[12]:·</span> | 857 | <span·class="gh">Out[12]:·</span> |
852 | <span·class="go">···a··b</span> | 858 | <span·class="go">···a··b</span> |
853 | <span·class="go">0··1··4</span> | 859 | <span·class="go">0··1··4</span> |
854 | <span·class="go">1··2··5</span> | 860 | <span·class="go">1··2··5</span> |
855 | <span·class="go">2··3··6</span> | 861 | <span·class="go">2··3··6</span> |
862 | <span·class="go">[3·rows·x·2·columns]</span> | ||
856 | <span·class="gp">In·[13]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">rename</span><span·class="p">(</span><span·class="nb">id</span><span·class="p">,</span>·<span·class="n">axis</span><span·class="o">=</span><span·class="s1">'index'</span><span·class="p">)</span> | 863 | <span·class="gp">In·[13]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">rename</span><span·class="p">(</span><span·class="nb">id</span><span·class="p">,</span>·<span·class="n">axis</span><span·class="o">=</span><span·class="s1">'index'</span><span·class="p">)</span> |
857 | <span·class="gh">Out[13]:·</span> | 864 | <span·class="gh">Out[13]:·</span> |
858 | <span·class="go">··········A··B</span> | 865 | <span·class="go">··········A··B</span> |
859 | <span·class="go">10730032··1··4</span> | 866 | <span·class="go">10730032··1··4</span> |
860 | <span·class="go">10730064··2··5</span> | 867 | <span·class="go">10730064··2··5</span> |
861 | <span·class="go">10730096··3··6</span> | 868 | <span·class="go">10730096··3··6</span> |
869 | <span·class="go">[3·rows·x·2·columns]</span> | ||
862 | </pre></div> | 870 | </pre></div> |
863 | </div> | 871 | </div> |
864 | <p>And·<code·class="docutils·literal·notranslate"><span·class="pre">reindex</span></code>:</p> | 872 | <p>And·<code·class="docutils·literal·notranslate"><span·class="pre">reindex</span></code>:</p> |
865 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[14]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">reindex</span><span·class="p">([</span><span·class="s1">'A'</span><span·class="p">,</span>·<span·class="s1">'B'</span><span·class="p">,</span>·<span·class="s1">'C'</span><span·class="p">],</span>·<span·class="n">axis</span><span·class="o">=</span><span·class="s1">'columns'</span><span·class="p">)</span> | 873 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[14]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">reindex</span><span·class="p">([</span><span·class="s1">'A'</span><span·class="p">,</span>·<span·class="s1">'B'</span><span·class="p">,</span>·<span·class="s1">'C'</span><span·class="p">],</span>·<span·class="n">axis</span><span·class="o">=</span><span·class="s1">'columns'</span><span·class="p">)</span> |
866 | <span·class="gh">Out[14]:·</span> | 874 | <span·class="gh">Out[14]:·</span> |
867 | <span·class="go">···A··B···C</span> | 875 | <span·class="go">···A··B···C</span> |
868 | <span·class="go">0··1··4·NaN</span> | 876 | <span·class="go">0··1··4·NaN</span> |
869 | <span·class="go">1··2··5·NaN</span> | 877 | <span·class="go">1··2··5·NaN</span> |
870 | <span·class="go">2··3··6·NaN</span> | 878 | <span·class="go">2··3··6·NaN</span> |
879 | <span·class="go">[3·rows·x·3·columns]</span> | ||
871 | <span·class="gp">In·[15]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">reindex</span><span·class="p">([</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">3</span><span·class="p">],</span>·<span·class="n">axis</span><span·class="o">=</span><span·class="s1">'index'</span><span·class="p">)</span> | 880 | <span·class="gp">In·[15]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">reindex</span><span·class="p">([</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">3</span><span·class="p">],</span>·<span·class="n">axis</span><span·class="o">=</span><span·class="s1">'index'</span><span·class="p">)</span> |
872 | <span·class="gh">Out[15]:·</span> | 881 | <span·class="gh">Out[15]:·</span> |
873 | <span·class="go">·····A····B</span> | 882 | <span·class="go">·····A····B</span> |
874 | <span·class="go">0··1.0··4.0</span> | 883 | <span·class="go">0··1.0··4.0</span> |
875 | <span·class="go">1··2.0··5.0</span> | 884 | <span·class="go">1··2.0··5.0</span> |
876 | <span·class="go">3··NaN··NaN</span> | 885 | <span·class="go">3··NaN··NaN</span> |
886 | <span·class="go">[3·rows·x·2·columns]</span> | ||
877 | </pre></div> | 887 | </pre></div> |
878 | </div> | 888 | </div> |
879 | <p>The·“index,·columns”·style·continues·to·work·as·before.</p> | 889 | <p>The·“index,·columns”·style·continues·to·work·as·before.</p> |
880 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[16]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">rename</span><span·class="p">(</span><span·class="n">index</span><span·class="o">=</span><span·class="nb">id</span><span·class="p">,</span>·<span·class="n">columns</span><span·class="o">=</span><span·class="nb">str</span><span·class="o">.</span><span·class="n">lower</span><span·class="p">)</span> | 890 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[16]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">rename</span><span·class="p">(</span><span·class="n">index</span><span·class="o">=</span><span·class="nb">id</span><span·class="p">,</span>·<span·class="n">columns</span><span·class="o">=</span><span·class="nb">str</span><span·class="o">.</span><span·class="n">lower</span><span·class="p">)</span> |
881 | <span·class="gh">Out[16]:·</span> | 891 | <span·class="gh">Out[16]:·</span> |
882 | <span·class="go">··········a··b</span> | 892 | <span·class="go">··········a··b</span> |
883 | <span·class="go">10730032··1··4</span> | 893 | <span·class="go">10730032··1··4</span> |
884 | <span·class="go">10730064··2··5</span> | 894 | <span·class="go">10730064··2··5</span> |
885 | <span·class="go">10730096··3··6</span> | 895 | <span·class="go">10730096··3··6</span> |
896 | <span·class="go">[3·rows·x·2·columns]</span> | ||
886 | <span·class="gp">In·[17]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">reindex</span><span·class="p">(</span><span·class="n">index</span><span·class="o">=</span><span·class="p">[</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">3</span><span·class="p">],</span>·<span·class="n">columns</span><span·class="o">=</span><span·class="p">[</span><span·class="s1">'A'</span><span·class="p">,</span>·<span·class="s1">'B'</span><span·class="p">,</span>·<span·class="s1">'C'</span><span·class="p">])</span> | 897 | <span·class="gp">In·[17]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">reindex</span><span·class="p">(</span><span·class="n">index</span><span·class="o">=</span><span·class="p">[</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">3</span><span·class="p">],</span>·<span·class="n">columns</span><span·class="o">=</span><span·class="p">[</span><span·class="s1">'A'</span><span·class="p">,</span>·<span·class="s1">'B'</span><span·class="p">,</span>·<span·class="s1">'C'</span><span·class="p">])</span> |
887 | <span·class="gh">Out[17]:·</span> | 898 | <span·class="gh">Out[17]:·</span> |
888 | <span·class="go">·····A····B···C</span> | 899 | <span·class="go">·····A····B···C</span> |
889 | <span·class="go">0··1.0··4.0·NaN</span> | 900 | <span·class="go">0··1.0··4.0·NaN</span> |
890 | <span·class="go">1··2.0··5.0·NaN</span> | 901 | <span·class="go">1··2.0··5.0·NaN</span> |
891 | <span·class="go">3··NaN··NaN·NaN</span> | 902 | <span·class="go">3··NaN··NaN·NaN</span> |
Max diff block lines reached; 22125/32659 bytes (67.75%) of diff not shown. |
Offset 212, 35 lines modified | Offset 212, 35 lines modified | ||
212 | ···...: | 212 | ···...: |
213 | In·[2]:·df.dtypes | 213 | In·[2]:·df.dtypes |
214 | Out[2]: | 214 | Out[2]: |
215 | A·····int64 | 215 | A·····int64 |
216 | B····object | 216 | B····object |
217 | C····object | 217 | C····object |
218 | dtype:·object | 218 | Length:·3,·dtype:·object |
219 | In·[3]:·df.infer_objects().dtypes | 219 | In·[3]:·df.infer_objects().dtypes |
220 | Out[3]: | 220 | Out[3]: |
221 | A·····int64 | 221 | A·····int64 |
222 | B·····int64 | 222 | B·····int64 |
223 | C····object | 223 | C····object |
224 | dtype:·object | 224 | Length:·3,·dtype:·object |
225 | Note·that·column·'C'·was·not·converted·-·only·scalar·numeric·types·will·be | 225 | Note·that·column·'C'·was·not·converted·-·only·scalar·numeric·types·will·be |
226 | converted·to·a·new·type.·Other·types·of·conversion·should·be·accomplished·using | 226 | converted·to·a·new·type.·Other·types·of·conversion·should·be·accomplished·using |
227 | the·_\x8t_\x8o_\x8__\x8n_\x8u_\x8m_\x8e_\x8r_\x8i_\x8c_\x8(_\x8)·function·(or·_\x8t_\x8o_\x8__\x8d_\x8a_\x8t_\x8e_\x8t_\x8i_\x8m_\x8e_\x8(_\x8),·_\x8t_\x8o_\x8__\x8t_\x8i_\x8m_\x8e_\x8d_\x8e_\x8l_\x8t_\x8a_\x8(_\x8)). | 227 | the·_\x8t_\x8o_\x8__\x8n_\x8u_\x8m_\x8e_\x8r_\x8i_\x8c_\x8(_\x8)·function·(or·_\x8t_\x8o_\x8__\x8d_\x8a_\x8t_\x8e_\x8t_\x8i_\x8m_\x8e_\x8(_\x8),·_\x8t_\x8o_\x8__\x8t_\x8i_\x8m_\x8e_\x8d_\x8e_\x8l_\x8t_\x8a_\x8(_\x8)). |
228 | In·[4]:·df·=·df.infer_objects() | 228 | In·[4]:·df·=·df.infer_objects() |
229 | In·[5]:·df['C']·=·pd.to_numeric(df['C'],·errors='coerce') | 229 | In·[5]:·df['C']·=·pd.to_numeric(df['C'],·errors='coerce') |
230 | In·[6]:·df.dtypes | 230 | In·[6]:·df.dtypes |
231 | Out[6]: | 231 | Out[6]: |
232 | A····int64 | 232 | A····int64 |
233 | B····int64 | 233 | B····int64 |
234 | C····int64 | 234 | C····int64 |
235 | dtype:·object | 235 | Length:·3,·dtype:·object |
236 | *\x8**\x8**\x8**\x8*·I\x8Im\x8mp\x8pr\x8ro\x8ov\x8ve\x8ed\x8d·w\x8wa\x8ar\x8rn\x8ni\x8in\x8ng\x8gs\x8s·w\x8wh\x8he\x8en\x8n·a\x8at\x8tt\x8te\x8em\x8mp\x8pt\x8ti\x8in\x8ng\x8g·t\x8to\x8o·c\x8cr\x8re\x8ea\x8at\x8te\x8e·c\x8co\x8ol\x8lu\x8um\x8mn\x8ns\x8s_\x8#\x8#·*\x8**\x8**\x8**\x8* | 236 | *\x8**\x8**\x8**\x8*·I\x8Im\x8mp\x8pr\x8ro\x8ov\x8ve\x8ed\x8d·w\x8wa\x8ar\x8rn\x8ni\x8in\x8ng\x8gs\x8s·w\x8wh\x8he\x8en\x8n·a\x8at\x8tt\x8te\x8em\x8mp\x8pt\x8ti\x8in\x8ng\x8g·t\x8to\x8o·c\x8cr\x8re\x8ea\x8at\x8te\x8e·c\x8co\x8ol\x8lu\x8um\x8mn\x8ns\x8s_\x8#\x8#·*\x8**\x8**\x8**\x8* |
237 | New·users·are·often·puzzled·by·the·relationship·between·column·operations·and | 237 | New·users·are·often·puzzled·by·the·relationship·between·column·operations·and |
238 | attribute·access·on·DataFrame·instances·(_\x8G_\x8H_\x8·_\x87_\x81_\x87_\x85).·One·specific·instance·of | 238 | attribute·access·on·DataFrame·instances·(_\x8G_\x8H_\x8·_\x87_\x81_\x87_\x85).·One·specific·instance·of |
239 | this·confusion·is·attempting·to·create·a·new·column·by·setting·an·attribute·on | 239 | this·confusion·is·attempting·to·create·a·new·column·by·setting·an·attribute·on |
240 | the·DataFrame: | 240 | the·DataFrame: |
241 | In·[1]:·df·=·pd.DataFrame({'one':·[1.,·2.,·3.]}) | 241 | In·[1]:·df·=·pd.DataFrame({'one':·[1.,·2.,·3.]}) |
242 | In·[2]:·df.two·=·[4,·5,·6] | 242 | In·[2]:·df.two·=·[4,·5,·6] |
Offset 264, 73 lines modified | Offset 264, 91 lines modified | ||
264 | In·[8]:·df | 264 | In·[8]:·df |
265 | Out[8]: | 265 | Out[8]: |
266 | ···A··B··C··D | 266 | ···A··B··C··D |
267 | 0··0··1··2··3 | 267 | 0··0··1··2··3 |
268 | 1··4··5··6··7 | 268 | 1··4··5··6··7 |
269 | [2·rows·x·4·columns] | ||
269 | In·[9]:·df.drop(['B',·'C'],·axis=1) | 270 | In·[9]:·df.drop(['B',·'C'],·axis=1) |
270 | Out[9]: | 271 | Out[9]: |
271 | ···A··D | 272 | ···A··D |
272 | 0··0··3 | 273 | 0··0··3 |
273 | 1··4··7 | 274 | 1··4··7 |
275 | [2·rows·x·2·columns] | ||
274 | #·the·following·is·now·equivalent | 276 | #·the·following·is·now·equivalent |
275 | In·[10]:·df.drop(columns=['B',·'C']) | 277 | In·[10]:·df.drop(columns=['B',·'C']) |
276 | Out[10]: | 278 | Out[10]: |
277 | ···A··D | 279 | ···A··D |
278 | 0··0··3 | 280 | 0··0··3 |
279 | 1··4··7 | 281 | 1··4··7 |
282 | [2·rows·x·2·columns] | ||
280 | *\x8**\x8**\x8**\x8*·M\x8Me\x8et\x8th\x8ho\x8od\x8ds\x8s·r\x8re\x8en\x8na\x8am\x8me\x8e,\x8,·r\x8re\x8ei\x8in\x8nd\x8de\x8ex\x8x·n\x8no\x8ow\x8w·a\x8al\x8ls\x8so\x8o·a\x8ac\x8cc\x8ce\x8ep\x8pt\x8t·a\x8ax\x8xi\x8is\x8s·k\x8ke\x8ey\x8yw\x8wo\x8or\x8rd\x8d_\x8#\x8#·*\x8**\x8**\x8**\x8* | 283 | *\x8**\x8**\x8**\x8*·M\x8Me\x8et\x8th\x8ho\x8od\x8ds\x8s·r\x8re\x8en\x8na\x8am\x8me\x8e,\x8,·r\x8re\x8ei\x8in\x8nd\x8de\x8ex\x8x·n\x8no\x8ow\x8w·a\x8al\x8ls\x8so\x8o·a\x8ac\x8cc\x8ce\x8ep\x8pt\x8t·a\x8ax\x8xi\x8is\x8s·k\x8ke\x8ey\x8yw\x8wo\x8or\x8rd\x8d_\x8#\x8#·*\x8**\x8**\x8**\x8* |
281 | The·_\x8D_\x8a_\x8t_\x8a_\x8F_\x8r_\x8a_\x8m_\x8e_\x8._\x8r_\x8e_\x8n_\x8a_\x8m_\x8e_\x8(_\x8)·and·_\x8D_\x8a_\x8t_\x8a_\x8F_\x8r_\x8a_\x8m_\x8e_\x8._\x8r_\x8e_\x8i_\x8n_\x8d_\x8e_\x8x_\x8(_\x8)·methods·have·gained·the·axis | 284 | The·_\x8D_\x8a_\x8t_\x8a_\x8F_\x8r_\x8a_\x8m_\x8e_\x8._\x8r_\x8e_\x8n_\x8a_\x8m_\x8e_\x8(_\x8)·and·_\x8D_\x8a_\x8t_\x8a_\x8F_\x8r_\x8a_\x8m_\x8e_\x8._\x8r_\x8e_\x8i_\x8n_\x8d_\x8e_\x8x_\x8(_\x8)·methods·have·gained·the·axis |
282 | keyword·to·specify·the·axis·to·target·with·the·operation·(_\x8G_\x8H_\x8·_\x81_\x82_\x83_\x89_\x82). | 285 | keyword·to·specify·the·axis·to·target·with·the·operation·(_\x8G_\x8H_\x8·_\x81_\x82_\x83_\x89_\x82). |
283 | Here’s·rename: | 286 | Here’s·rename: |
284 | In·[11]:·df·=·pd.DataFrame({"A":·[1,·2,·3],·"B":·[4,·5,·6]}) | 287 | In·[11]:·df·=·pd.DataFrame({"A":·[1,·2,·3],·"B":·[4,·5,·6]}) |
285 | In·[12]:·df.rename(str.lower,·axis='columns') | 288 | In·[12]:·df.rename(str.lower,·axis='columns') |
286 | Out[12]: | 289 | Out[12]: |
287 | ···a··b | 290 | ···a··b |
288 | 0··1··4 | 291 | 0··1··4 |
289 | 1··2··5 | 292 | 1··2··5 |
290 | 2··3··6 | 293 | 2··3··6 |
294 | [3·rows·x·2·columns] | ||
291 | In·[13]:·df.rename(id,·axis='index') | 295 | In·[13]:·df.rename(id,·axis='index') |
292 | Out[13]: | 296 | Out[13]: |
293 | ··········A··B | 297 | ··········A··B |
294 | 10730032··1··4 | 298 | 10730032··1··4 |
295 | 10730064··2··5 | 299 | 10730064··2··5 |
296 | 10730096··3··6 | 300 | 10730096··3··6 |
301 | [3·rows·x·2·columns] | ||
297 | And·reindex: | 302 | And·reindex: |
298 | In·[14]:·df.reindex(['A',·'B',·'C'],·axis='columns') | 303 | In·[14]:·df.reindex(['A',·'B',·'C'],·axis='columns') |
299 | Out[14]: | 304 | Out[14]: |
300 | ···A··B···C | 305 | ···A··B···C |
301 | 0··1··4·NaN | 306 | 0··1··4·NaN |
302 | 1··2··5·NaN | 307 | 1··2··5·NaN |
303 | 2··3··6·NaN | 308 | 2··3··6·NaN |
309 | [3·rows·x·3·columns] | ||
304 | In·[15]:·df.reindex([0,·1,·3],·axis='index') | 310 | In·[15]:·df.reindex([0,·1,·3],·axis='index') |
305 | Out[15]: | 311 | Out[15]: |
306 | ·····A····B | 312 | ·····A····B |
307 | 0··1.0··4.0 | 313 | 0··1.0··4.0 |
308 | 1··2.0··5.0 | 314 | 1··2.0··5.0 |
309 | 3··NaN··NaN | 315 | 3··NaN··NaN |
316 | [3·rows·x·2·columns] | ||
310 | The·“index,·columns”·style·continues·to·work·as·before. | 317 | The·“index,·columns”·style·continues·to·work·as·before. |
311 | In·[16]:·df.rename(index=id,·columns=str.lower) | 318 | In·[16]:·df.rename(index=id,·columns=str.lower) |
312 | Out[16]: | 319 | Out[16]: |
313 | ··········a··b | 320 | ··········a··b |
314 | 10730032··1··4 | 321 | 10730032··1··4 |
315 | 10730064··2··5 | 322 | 10730064··2··5 |
316 | 10730096··3··6 | 323 | 10730096··3··6 |
324 | [3·rows·x·2·columns] | ||
317 | In·[17]:·df.reindex(index=[0,·1,·3],·columns=['A',·'B',·'C']) | 325 | In·[17]:·df.reindex(index=[0,·1,·3],·columns=['A',·'B',·'C']) |
318 | Out[17]: | 326 | Out[17]: |
319 | ·····A····B···C | 327 | ·····A····B···C |
320 | 0··1.0··4.0·NaN | 328 | 0··1.0··4.0·NaN |
321 | 1··2.0··5.0·NaN | 329 | 1··2.0··5.0·NaN |
322 | 3··NaN··NaN·NaN | 330 | 3··NaN··NaN·NaN |
331 | [3·rows·x·3·columns] | ||
323 | We·h\x8hi\x8ig\x8gh\x8hl\x8ly\x8y·encourage·using·named·arguments·to·avoid·confusion·when·using·either | 332 | We·h\x8hi\x8ig\x8gh\x8hl\x8ly\x8y·encourage·using·named·arguments·to·avoid·confusion·when·using·either |
324 | style. | 333 | style. |
325 | *\x8**\x8**\x8**\x8*·C\x8Ca\x8at\x8te\x8eg\x8go\x8or\x8ri\x8ic\x8ca\x8al\x8lD\x8Dt\x8ty\x8yp\x8pe\x8e·f\x8fo\x8or\x8r·s\x8sp\x8pe\x8ec\x8ci\x8if\x8fy\x8yi\x8in\x8ng\x8g·c\x8ca\x8at\x8te\x8eg\x8go\x8or\x8ri\x8ic\x8ca\x8al\x8ls\x8s_\x8#\x8#·*\x8**\x8**\x8**\x8* | 334 | *\x8**\x8**\x8**\x8*·C\x8Ca\x8at\x8te\x8eg\x8go\x8or\x8ri\x8ic\x8ca\x8al\x8lD\x8Dt\x8ty\x8yp\x8pe\x8e·f\x8fo\x8or\x8r·s\x8sp\x8pe\x8ec\x8ci\x8if\x8fy\x8yi\x8in\x8ng\x8g·c\x8ca\x8at\x8te\x8eg\x8go\x8or\x8ri\x8ic\x8ca\x8al\x8ls\x8s_\x8#\x8#·*\x8**\x8**\x8**\x8* |
326 | pandas.api.types.CategoricalDtype·has·been·added·to·the·public·API·and·expanded | 335 | pandas.api.types.CategoricalDtype·has·been·added·to·the·public·API·and·expanded |
327 | to·include·the·categories·and·ordered·attributes.·A·CategoricalDtype·can·be | 336 | to·include·the·categories·and·ordered·attributes.·A·CategoricalDtype·can·be |
328 | used·to·specify·the·set·of·categories·and·orderedness·of·an·array,·independent | 337 | used·to·specify·the·set·of·categories·and·orderedness·of·an·array,·independent |
329 | of·the·data.·This·can·be·useful·for·example,·when·converting·string·data·to·a | 338 | of·the·data.·This·can·be·useful·for·example,·when·converting·string·data·to·a |
Max diff block lines reached; 6759/10396 bytes (65.02%) of diff not shown. |
Offset 745, 24 lines modified | Offset 745, 24 lines modified | ||
745 | <p><em>pandas·0.22</em></p> | 745 | <p><em>pandas·0.22</em></p> |
746 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[8]:·</span><span·class="n">grouper</span>·<span·class="o">=</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">Categorical</span><span·class="p">([</span><span·class="s2">"a"</span><span·class="p">,</span>·<span·class="s2">"a"</span><span·class="p">],</span>·<span·class="n">categories</span><span·class="o">=</span><span·class="p">[</span><span·class="s2">"a"</span><span·class="p">,</span>·<span·class="s2">"b"</span><span·class="p">])</span> | 746 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[8]:·</span><span·class="n">grouper</span>·<span·class="o">=</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">Categorical</span><span·class="p">([</span><span·class="s2">"a"</span><span·class="p">,</span>·<span·class="s2">"a"</span><span·class="p">],</span>·<span·class="n">categories</span><span·class="o">=</span><span·class="p">[</span><span·class="s2">"a"</span><span·class="p">,</span>·<span·class="s2">"b"</span><span·class="p">])</span> |
747 | <span·class="gp">In·[9]:·</span><span·class="n">pd</span><span·class="o">.</span><span·class="n">Series</span><span·class="p">([</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">2</span><span·class="p">])</span><span·class="o">.</span><span·class="n">groupby</span><span·class="p">(</span><span·class="n">grouper</span><span·class="p">,</span>·<span·class="n">observed</span><span·class="o">=</span><span·class="kc">False</span><span·class="p">)</span><span·class="o">.</span><span·class="n">sum</span><span·class="p">()</span> | 747 | <span·class="gp">In·[9]:·</span><span·class="n">pd</span><span·class="o">.</span><span·class="n">Series</span><span·class="p">([</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">2</span><span·class="p">])</span><span·class="o">.</span><span·class="n">groupby</span><span·class="p">(</span><span·class="n">grouper</span><span·class="p">,</span>·<span·class="n">observed</span><span·class="o">=</span><span·class="kc">False</span><span·class="p">)</span><span·class="o">.</span><span·class="n">sum</span><span·class="p">()</span> |
748 | <span·class="gh">Out[9]:·</span> | 748 | <span·class="gh">Out[9]:·</span> |
749 | <span·class="go">a····3</span> | 749 | <span·class="go">a····3</span> |
750 | <span·class="go">b····0</span> | 750 | <span·class="go">b····0</span> |
751 | <span·class="go">dtype:·int64</span> | 751 | <span·class="go">Length:·2,·dtype:·int64</span> |
752 | </pre></div> | 752 | </pre></div> |
753 | </div> | 753 | </div> |
754 | <p>To·restore·the·0.21·behavior·of·returning·<code·class="docutils·literal·notranslate"><span·class="pre">NaN</span></code>·for·unobserved·groups, | 754 | <p>To·restore·the·0.21·behavior·of·returning·<code·class="docutils·literal·notranslate"><span·class="pre">NaN</span></code>·for·unobserved·groups, |
755 | use·<code·class="docutils·literal·notranslate"><span·class="pre">min_count>=1</span></code>.</p> | 755 | use·<code·class="docutils·literal·notranslate"><span·class="pre">min_count>=1</span></code>.</p> |
756 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[10]:·</span><span·class="n">pd</span><span·class="o">.</span><span·class="n">Series</span><span·class="p">([</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">2</span><span·class="p">])</span><span·class="o">.</span><span·class="n">groupby</span><span·class="p">(</span><span·class="n">grouper</span><span·class="p">,</span>·<span·class="n">observed</span><span·class="o">=</span><span·class="kc">False</span><span·class="p">)</span><span·class="o">.</span><span·class="n">sum</span><span·class="p">(</span><span·class="n">min_count</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">)</span> | 756 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[10]:·</span><span·class="n">pd</span><span·class="o">.</span><span·class="n">Series</span><span·class="p">([</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">2</span><span·class="p">])</span><span·class="o">.</span><span·class="n">groupby</span><span·class="p">(</span><span·class="n">grouper</span><span·class="p">,</span>·<span·class="n">observed</span><span·class="o">=</span><span·class="kc">False</span><span·class="p">)</span><span·class="o">.</span><span·class="n">sum</span><span·class="p">(</span><span·class="n">min_count</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">)</span> |
757 | <span·class="gh">Out[10]:·</span> | 757 | <span·class="gh">Out[10]:·</span> |
758 | <span·class="go">a····3.0</span> | 758 | <span·class="go">a····3.0</span> |
759 | <span·class="go">b····NaN</span> | 759 | <span·class="go">b····NaN</span> |
760 | <span·class="go">dtype:·float64</span> | 760 | <span·class="go">Length:·2,·dtype:·float64</span> |
761 | </pre></div> | 761 | </pre></div> |
762 | </div> | 762 | </div> |
763 | </section> | 763 | </section> |
764 | <section·id="resample"> | 764 | <section·id="resample"> |
765 | <h3>Resample<a·class="headerlink"·href="#resample"·title="Link·to·this·heading">#</a></h3> | 765 | <h3>Resample<a·class="headerlink"·href="#resample"·title="Link·to·this·heading">#</a></h3> |
766 | <p>The·sum·and·product·of·all-<em>NA</em>·bins·has·changed·from·<code·class="docutils·literal·notranslate"><span·class="pre">NaN</span></code>·to·<code·class="docutils·literal·notranslate"><span·class="pre">0</span></code>·for | 766 | <p>The·sum·and·product·of·all-<em>NA</em>·bins·has·changed·from·<code·class="docutils·literal·notranslate"><span·class="pre">NaN</span></code>·to·<code·class="docutils·literal·notranslate"><span·class="pre">0</span></code>·for |
767 | sum·and·<code·class="docutils·literal·notranslate"><span·class="pre">1</span></code>·for·product.</p> | 767 | sum·and·<code·class="docutils·literal·notranslate"><span·class="pre">1</span></code>·for·product.</p> |
Offset 787, 23 lines modified | Offset 787, 23 lines modified | ||
787 | <p><em>pandas·0.22.0</em></p> | 787 | <p><em>pandas·0.22.0</em></p> |
788 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[11]:·</span><span·class="n">s</span>·<span·class="o">=</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">Series</span><span·class="p">([</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">1</span><span·class="p">,</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">nan</span><span·class="p">,</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">nan</span><span·class="p">],</span>·<span·class="n">index</span><span·class="o">=</span><span·class="n">pd</span><span·class="o">.</span><span·class="n">date_range</span><span·class="p">(</span><span·class="s2">"2017"</span><span·class="p">,</span>·<span·class="n">periods</span><span·class="o">=</span><span·class="mi">4</span><span·class="p">))</span> | 788 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[11]:·</span><span·class="n">s</span>·<span·class="o">=</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">Series</span><span·class="p">([</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">1</span><span·class="p">,</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">nan</span><span·class="p">,</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">nan</span><span·class="p">],</span>·<span·class="n">index</span><span·class="o">=</span><span·class="n">pd</span><span·class="o">.</span><span·class="n">date_range</span><span·class="p">(</span><span·class="s2">"2017"</span><span·class="p">,</span>·<span·class="n">periods</span><span·class="o">=</span><span·class="mi">4</span><span·class="p">))</span> |
789 | <span·class="gp">In·[12]:·</span><span·class="n">s</span><span·class="o">.</span><span·class="n">resample</span><span·class="p">(</span><span·class="s2">"2d"</span><span·class="p">)</span><span·class="o">.</span><span·class="n">sum</span><span·class="p">()</span> | 789 | <span·class="gp">In·[12]:·</span><span·class="n">s</span><span·class="o">.</span><span·class="n">resample</span><span·class="p">(</span><span·class="s2">"2d"</span><span·class="p">)</span><span·class="o">.</span><span·class="n">sum</span><span·class="p">()</span> |
790 | <span·class="gh">Out[12]:·</span> | 790 | <span·class="gh">Out[12]:·</span> |
791 | <span·class="go">2017-01-01····2.0</span> | 791 | <span·class="go">2017-01-01····2.0</span> |
792 | <span·class="go">2017-01-03····0.0</span> | 792 | <span·class="go">2017-01-03····0.0</span> |
793 | <span·class="go">Freq:·2D,·dtype:·float64</span> | 793 | <span·class="go">Freq:·2D,·Length:·2,·dtype:·float64</span> |
794 | </pre></div> | 794 | </pre></div> |
795 | </div> | 795 | </div> |
796 | <p>To·restore·the·0.21·behavior·of·returning·<code·class="docutils·literal·notranslate"><span·class="pre">NaN</span></code>,·use·<code·class="docutils·literal·notranslate"><span·class="pre">min_count>=1</span></code>.</p> | 796 | <p>To·restore·the·0.21·behavior·of·returning·<code·class="docutils·literal·notranslate"><span·class="pre">NaN</span></code>,·use·<code·class="docutils·literal·notranslate"><span·class="pre">min_count>=1</span></code>.</p> |
797 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[13]:·</span><span·class="n">s</span><span·class="o">.</span><span·class="n">resample</span><span·class="p">(</span><span·class="s2">"2d"</span><span·class="p">)</span><span·class="o">.</span><span·class="n">sum</span><span·class="p">(</span><span·class="n">min_count</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">)</span> | 797 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[13]:·</span><span·class="n">s</span><span·class="o">.</span><span·class="n">resample</span><span·class="p">(</span><span·class="s2">"2d"</span><span·class="p">)</span><span·class="o">.</span><span·class="n">sum</span><span·class="p">(</span><span·class="n">min_count</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">)</span> |
798 | <span·class="gh">Out[13]:·</span> | 798 | <span·class="gh">Out[13]:·</span> |
799 | <span·class="go">2017-01-01····2.0</span> | 799 | <span·class="go">2017-01-01····2.0</span> |
800 | <span·class="go">2017-01-03····NaN</span> | 800 | <span·class="go">2017-01-03····NaN</span> |
801 | <span·class="go">Freq:·2D,·dtype:·float64</span> | 801 | <span·class="go">Freq:·2D,·Length:·2,·dtype:·float64</span> |
802 | </pre></div> | 802 | </pre></div> |
803 | </div> | 803 | </div> |
804 | <p>In·particular,·upsampling·and·taking·the·sum·or·product·is·affected,·as | 804 | <p>In·particular,·upsampling·and·taking·the·sum·or·product·is·affected,·as |
805 | upsampling·introduces·missing·values·even·if·the·original·series·was | 805 | upsampling·introduces·missing·values·even·if·the·original·series·was |
806 | entirely·valid.</p> | 806 | entirely·valid.</p> |
807 | <p><em>pandas·0.21.x</em></p> | 807 | <p><em>pandas·0.21.x</em></p> |
808 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[14]:·</span><span·class="n">idx</span>·<span·class="o">=</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">DatetimeIndex</span><span·class="p">([</span><span·class="s1">'2017-01-01'</span><span·class="p">,</span>·<span·class="s1">'2017-01-02'</span><span·class="p">])</span> | 808 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[14]:·</span><span·class="n">idx</span>·<span·class="o">=</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">DatetimeIndex</span><span·class="p">([</span><span·class="s1">'2017-01-01'</span><span·class="p">,</span>·<span·class="s1">'2017-01-02'</span><span·class="p">])</span> |
Offset 856, 15 lines modified | Offset 856, 15 lines modified | ||
856 | <p><em>pandas·0.22.0</em></p> | 856 | <p><em>pandas·0.22.0</em></p> |
857 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[14]:·</span><span·class="n">s</span>·<span·class="o">=</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">Series</span><span·class="p">([</span><span·class="n">np</span><span·class="o">.</span><span·class="n">nan</span><span·class="p">,</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">nan</span><span·class="p">])</span> | 857 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[14]:·</span><span·class="n">s</span>·<span·class="o">=</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">Series</span><span·class="p">([</span><span·class="n">np</span><span·class="o">.</span><span·class="n">nan</span><span·class="p">,</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">nan</span><span·class="p">])</span> |
858 | <span·class="gp">In·[15]:·</span><span·class="n">s</span><span·class="o">.</span><span·class="n">rolling</span><span·class="p">(</span><span·class="mi">2</span><span·class="p">,</span>·<span·class="n">min_periods</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">)</span><span·class="o">.</span><span·class="n">sum</span><span·class="p">()</span> | 858 | <span·class="gp">In·[15]:·</span><span·class="n">s</span><span·class="o">.</span><span·class="n">rolling</span><span·class="p">(</span><span·class="mi">2</span><span·class="p">,</span>·<span·class="n">min_periods</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">)</span><span·class="o">.</span><span·class="n">sum</span><span·class="p">()</span> |
859 | <span·class="gh">Out[15]:·</span> | 859 | <span·class="gh">Out[15]:·</span> |
860 | <span·class="go">0····0.0</span> | 860 | <span·class="go">0····0.0</span> |
861 | <span·class="go">1····0.0</span> | 861 | <span·class="go">1····0.0</span> |
862 | <span·class="go">dtype:·float64</span> | 862 | <span·class="go">Length:·2,·dtype:·float64</span> |
863 | </pre></div> | 863 | </pre></div> |
864 | </div> | 864 | </div> |
865 | <p>The·default·behavior·of·<code·class="docutils·literal·notranslate"><span·class="pre">min_periods=None</span></code>,·implying·that·<code·class="docutils·literal·notranslate"><span·class="pre">min_periods</span></code> | 865 | <p>The·default·behavior·of·<code·class="docutils·literal·notranslate"><span·class="pre">min_periods=None</span></code>,·implying·that·<code·class="docutils·literal·notranslate"><span·class="pre">min_periods</span></code> |
866 | equals·the·window·size,·is·unchanged.</p> | 866 | equals·the·window·size,·is·unchanged.</p> |
867 | </section> | 867 | </section> |
868 | </section> | 868 | </section> |
869 | <section·id="compatibility"> | 869 | <section·id="compatibility"> |
Offset 192, 22 lines modified | Offset 192, 22 lines modified | ||
192 | p\x8pa\x8an\x8nd\x8da\x8as\x8s·0\x80.\x8.2\x822\x82 | 192 | p\x8pa\x8an\x8nd\x8da\x8as\x8s·0\x80.\x8.2\x822\x82 |
193 | In·[8]:·grouper·=·pd.Categorical(["a",·"a"],·categories=["a",·"b"]) | 193 | In·[8]:·grouper·=·pd.Categorical(["a",·"a"],·categories=["a",·"b"]) |
194 | In·[9]:·pd.Series([1,·2]).groupby(grouper,·observed=False).sum() | 194 | In·[9]:·pd.Series([1,·2]).groupby(grouper,·observed=False).sum() |
195 | Out[9]: | 195 | Out[9]: |
196 | a····3 | 196 | a····3 |
197 | b····0 | 197 | b····0 |
198 | dtype:·int64 | 198 | Length:·2,·dtype:·int64 |
199 | To·restore·the·0.21·behavior·of·returning·NaN·for·unobserved·groups,·use | 199 | To·restore·the·0.21·behavior·of·returning·NaN·for·unobserved·groups,·use |
200 | min_count>=1. | 200 | min_count>=1. |
201 | In·[10]:·pd.Series([1,·2]).groupby(grouper,·observed=False).sum(min_count=1) | 201 | In·[10]:·pd.Series([1,·2]).groupby(grouper,·observed=False).sum(min_count=1) |
202 | Out[10]: | 202 | Out[10]: |
203 | a····3.0 | 203 | a····3.0 |
204 | b····NaN | 204 | b····NaN |
205 | dtype:·float64 | 205 | Length:·2,·dtype:·float64 |
206 | *\x8**\x8**\x8**\x8*·R\x8Re\x8es\x8sa\x8am\x8mp\x8pl\x8le\x8e_\x8#\x8#·*\x8**\x8**\x8**\x8* | 206 | *\x8**\x8**\x8**\x8*·R\x8Re\x8es\x8sa\x8am\x8mp\x8pl\x8le\x8e_\x8#\x8#·*\x8**\x8**\x8**\x8* |
207 | The·sum·and·product·of·all-N\x8NA\x8A·bins·has·changed·from·NaN·to·0·for·sum·and·1·for | 207 | The·sum·and·product·of·all-N\x8NA\x8A·bins·has·changed·from·NaN·to·0·for·sum·and·1·for |
208 | product. | 208 | product. |
209 | p\x8pa\x8an\x8nd\x8da\x8as\x8s·0\x80.\x8.2\x821\x81.\x8.x\x8x | 209 | p\x8pa\x8an\x8nd\x8da\x8as\x8s·0\x80.\x8.2\x821\x81.\x8.x\x8x |
210 | In·[11]:·s·=·pd.Series([1,·1,·np.nan,·np.nan], | 210 | In·[11]:·s·=·pd.Series([1,·1,·np.nan,·np.nan], |
211 | ···....:···············index=pd.date_range('2017',·periods=4)) | 211 | ···....:···············index=pd.date_range('2017',·periods=4)) |
212 | ···....:·s | 212 | ···....:·s |
Offset 227, 21 lines modified | Offset 227, 21 lines modified | ||
227 | In·[11]:·s·=·pd.Series([1,·1,·np.nan,·np.nan],·index=pd.date_range("2017", | 227 | In·[11]:·s·=·pd.Series([1,·1,·np.nan,·np.nan],·index=pd.date_range("2017", |
228 | periods=4)) | 228 | periods=4)) |
229 | In·[12]:·s.resample("2d").sum() | 229 | In·[12]:·s.resample("2d").sum() |
230 | Out[12]: | 230 | Out[12]: |
231 | 2017-01-01····2.0 | 231 | 2017-01-01····2.0 |
232 | 2017-01-03····0.0 | 232 | 2017-01-03····0.0 |
233 | Freq:·2D,·dtype:·float64 | 233 | Freq:·2D,·Length:·2,·dtype:·float64 |
234 | To·restore·the·0.21·behavior·of·returning·NaN,·use·min_count>=1. | 234 | To·restore·the·0.21·behavior·of·returning·NaN,·use·min_count>=1. |
235 | In·[13]:·s.resample("2d").sum(min_count=1) | 235 | In·[13]:·s.resample("2d").sum(min_count=1) |
236 | Out[13]: | 236 | Out[13]: |
237 | 2017-01-01····2.0 | 237 | 2017-01-01····2.0 |
238 | 2017-01-03····NaN | 238 | 2017-01-03····NaN |
239 | Freq:·2D,·dtype:·float64 | 239 | Freq:·2D,·Length:·2,·dtype:·float64 |
240 | In·particular,·upsampling·and·taking·the·sum·or·product·is·affected,·as | 240 | In·particular,·upsampling·and·taking·the·sum·or·product·is·affected,·as |
241 | upsampling·introduces·missing·values·even·if·the·original·series·was·entirely | 241 | upsampling·introduces·missing·values·even·if·the·original·series·was·entirely |
242 | valid. | 242 | valid. |
243 | p\x8pa\x8an\x8nd\x8da\x8as\x8s·0\x80.\x8.2\x821\x81.\x8.x\x8x | 243 | p\x8pa\x8an\x8nd\x8da\x8as\x8s·0\x80.\x8.2\x821\x81.\x8.x\x8x |
244 | In·[14]:·idx·=·pd.DatetimeIndex(['2017-01-01',·'2017-01-02']) | 244 | In·[14]:·idx·=·pd.DatetimeIndex(['2017-01-01',·'2017-01-02']) |
245 | In·[15]:·pd.Series([1,·2],·index=idx).resample('12H').sum() | 245 | In·[15]:·pd.Series([1,·2],·index=idx).resample('12H').sum() |
Offset 281, 15 lines modified | Offset 281, 15 lines modified | ||
281 | p\x8pa\x8an\x8nd\x8da\x8as\x8s·0\x80.\x8.2\x822\x82.\x8.0\x80 | 281 | p\x8pa\x8an\x8nd\x8da\x8as\x8s·0\x80.\x8.2\x822\x82.\x8.0\x80 |
282 | In·[14]:·s·=·pd.Series([np.nan,·np.nan]) | 282 | In·[14]:·s·=·pd.Series([np.nan,·np.nan]) |
283 | In·[15]:·s.rolling(2,·min_periods=0).sum() | 283 | In·[15]:·s.rolling(2,·min_periods=0).sum() |
284 | Out[15]: | 284 | Out[15]: |
285 | 0····0.0 | 285 | 0····0.0 |
286 | 1····0.0 | 286 | 1····0.0 |
287 | dtype:·float64 | 287 | Length:·2,·dtype:·float64 |
288 | The·default·behavior·of·min_periods=None,·implying·that·min_periods·equals·the | 288 | The·default·behavior·of·min_periods=None,·implying·that·min_periods·equals·the |
289 | window·size,·is·unchanged. | 289 | window·size,·is·unchanged. |
290 | *\x8**\x8**\x8**\x8**\x8*·C\x8Co\x8om\x8mp\x8pa\x8at\x8ti\x8ib\x8bi\x8il\x8li\x8it\x8ty\x8y_\x8#\x8#·*\x8**\x8**\x8**\x8**\x8* | 290 | *\x8**\x8**\x8**\x8**\x8*·C\x8Co\x8om\x8mp\x8pa\x8at\x8ti\x8ib\x8bi\x8il\x8li\x8it\x8ty\x8y_\x8#\x8#·*\x8**\x8**\x8**\x8**\x8* |
291 | If·you·maintain·a·library·that·should·work·across·pandas·versions,·it·may·be | 291 | If·you·maintain·a·library·that·should·work·across·pandas·versions,·it·may·be |
292 | easiest·to·exclude·pandas·0.21·from·your·requirements.·Otherwise,·all·your·sum | 292 | easiest·to·exclude·pandas·0.21·from·your·requirements.·Otherwise,·all·your·sum |
293 | ()·calls·would·need·to·check·if·the·Series·is·empty·before·summing. | 293 | ()·calls·would·need·to·check·if·the·Series·is·empty·before·summing. |
294 | With·setuptools,·in·your·setup.py·use: | 294 | With·setuptools,·in·your·setup.py·use: |
Offset 756, 42 lines modified | Offset 756, 46 lines modified | ||
756 | <span·class="go">·····foo·bar········baz·qux</span> | 756 | <span·class="go">·····foo·bar········baz·qux</span> |
757 | <span·class="go">idx························</span> | 757 | <span·class="go">idx························</span> |
758 | <span·class="go">0······1···a·2018-01-01···a</span> | 758 | <span·class="go">0······1···a·2018-01-01···a</span> |
759 | <span·class="go">1······2···b·2018-01-02···b</span> | 759 | <span·class="go">1······2···b·2018-01-02···b</span> |
760 | <span·class="go">2······3···c·2018-01-03···c</span> | 760 | <span·class="go">2······3···c·2018-01-03···c</span> |
761 | <span·class="go">3······4···d·2018-01-04···c</span> | 761 | <span·class="go">3······4···d·2018-01-04···c</span> |
762 | <span·class="go">[4·rows·x·4·columns]</span> | ||
762 | <span·class="gp">In·[3]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">dtypes</span> | 763 | <span·class="gp">In·[3]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">dtypes</span> |
763 | <span·class="gh">Out[3]:·</span> | 764 | <span·class="gh">Out[3]:·</span> |
764 | <span·class="go">foo·············int64</span> | 765 | <span·class="go">foo·············int64</span> |
765 | <span·class="go">bar············object</span> | 766 | <span·class="go">bar············object</span> |
766 | <span·class="go">baz····datetime64[ns]</span> | 767 | <span·class="go">baz····datetime64[ns]</span> |
767 | <span·class="go">qux··········category</span> | 768 | <span·class="go">qux··········category</span> |
768 | <span·class="go">dtype:·object</span> | 769 | <span·class="go">Length:·4,·dtype:·object</span> |
769 | <span·class="gp">In·[4]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">to_json</span><span·class="p">(</span><span·class="s1">'test.json'</span><span·class="p">,</span>·<span·class="n">orient</span><span·class="o">=</span><span·class="s1">'table'</span><span·class="p">)</span> | 770 | <span·class="gp">In·[4]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">to_json</span><span·class="p">(</span><span·class="s1">'test.json'</span><span·class="p">,</span>·<span·class="n">orient</span><span·class="o">=</span><span·class="s1">'table'</span><span·class="p">)</span> |
770 | <span·class="gp">In·[5]:·</span><span·class="n">new_df</span>·<span·class="o">=</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">read_json</span><span·class="p">(</span><span·class="s1">'test.json'</span><span·class="p">,</span>·<span·class="n">orient</span><span·class="o">=</span><span·class="s1">'table'</span><span·class="p">)</span> | 771 | <span·class="gp">In·[5]:·</span><span·class="n">new_df</span>·<span·class="o">=</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">read_json</span><span·class="p">(</span><span·class="s1">'test.json'</span><span·class="p">,</span>·<span·class="n">orient</span><span·class="o">=</span><span·class="s1">'table'</span><span·class="p">)</span> |
771 | <span·class="gp">In·[6]:·</span><span·class="n">new_df</span> | 772 | <span·class="gp">In·[6]:·</span><span·class="n">new_df</span> |
772 | <span·class="gh">Out[6]:·</span> | 773 | <span·class="gh">Out[6]:·</span> |
773 | <span·class="go">·····foo·bar········baz·qux</span> | 774 | <span·class="go">·····foo·bar········baz·qux</span> |
774 | <span·class="go">idx························</span> | 775 | <span·class="go">idx························</span> |
775 | <span·class="go">0······1···a·2018-01-01···a</span> | 776 | <span·class="go">0······1···a·2018-01-01···a</span> |
776 | <span·class="go">1······2···b·2018-01-02···b</span> | 777 | <span·class="go">1······2···b·2018-01-02···b</span> |
777 | <span·class="go">2······3···c·2018-01-03···c</span> | 778 | <span·class="go">2······3···c·2018-01-03···c</span> |
778 | <span·class="go">3······4···d·2018-01-04···c</span> | 779 | <span·class="go">3······4···d·2018-01-04···c</span> |
780 | <span·class="go">[4·rows·x·4·columns]</span> | ||
779 | <span·class="gp">In·[7]:·</span><span·class="n">new_df</span><span·class="o">.</span><span·class="n">dtypes</span> | 781 | <span·class="gp">In·[7]:·</span><span·class="n">new_df</span><span·class="o">.</span><span·class="n">dtypes</span> |
780 | <span·class="gh">Out[7]:·</span> | 782 | <span·class="gh">Out[7]:·</span> |
781 | <span·class="go">foo·············int64</span> | 783 | <span·class="go">foo·············int64</span> |
782 | <span·class="go">bar············object</span> | 784 | <span·class="go">bar············object</span> |
783 | <span·class="go">baz····datetime64[ns]</span> | 785 | <span·class="go">baz····datetime64[ns]</span> |
784 | <span·class="go">qux··········category</span> | 786 | <span·class="go">qux··········category</span> |
785 | <span·class="go">dtype:·object</span> | 787 | <span·class="go">Length:·4,·dtype:·object</span> |
786 | </pre></div> | 788 | </pre></div> |
787 | </div> | 789 | </div> |
788 | <p>Please·note·that·the·string·<code·class="docutils·literal·notranslate"><span·class="pre">index</span></code>·is·not·supported·with·the·round·trip·format,·as·it·is·used·by·default·in·<code·class="docutils·literal·notranslate"><span·class="pre">write_json</span></code>·to·indicate·a·missing·index·name.</p> | 790 | <p>Please·note·that·the·string·<code·class="docutils·literal·notranslate"><span·class="pre">index</span></code>·is·not·supported·with·the·round·trip·format,·as·it·is·used·by·default·in·<code·class="docutils·literal·notranslate"><span·class="pre">write_json</span></code>·to·indicate·a·missing·index·name.</p> |
789 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[8]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">index</span><span·class="o">.</span><span·class="n">name</span>·<span·class="o">=</span>·<span·class="s1">'index'</span> | 791 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[8]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">index</span><span·class="o">.</span><span·class="n">name</span>·<span·class="o">=</span>·<span·class="s1">'index'</span> |
790 | <span·class="gp">In·[9]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">to_json</span><span·class="p">(</span><span·class="s1">'test.json'</span><span·class="p">,</span>·<span·class="n">orient</span><span·class="o">=</span><span·class="s1">'table'</span><span·class="p">)</span> | 792 | <span·class="gp">In·[9]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">to_json</span><span·class="p">(</span><span·class="s1">'test.json'</span><span·class="p">,</span>·<span·class="n">orient</span><span·class="o">=</span><span·class="s1">'table'</span><span·class="p">)</span> |
Offset 801, 21 lines modified | Offset 805, 23 lines modified | ||
801 | <span·class="gh">Out[11]:·</span> | 805 | <span·class="gh">Out[11]:·</span> |
802 | <span·class="go">···foo·bar········baz·qux</span> | 806 | <span·class="go">···foo·bar········baz·qux</span> |
803 | <span·class="go">0····1···a·2018-01-01···a</span> | 807 | <span·class="go">0····1···a·2018-01-01···a</span> |
804 | <span·class="go">1····2···b·2018-01-02···b</span> | 808 | <span·class="go">1····2···b·2018-01-02···b</span> |
805 | <span·class="go">2····3···c·2018-01-03···c</span> | 809 | <span·class="go">2····3···c·2018-01-03···c</span> |
806 | <span·class="go">3····4···d·2018-01-04···c</span> | 810 | <span·class="go">3····4···d·2018-01-04···c</span> |
811 | <span·class="go">[4·rows·x·4·columns]</span> | ||
807 | <span·class="gp">In·[12]:·</span><span·class="n">new_df</span><span·class="o">.</span><span·class="n">dtypes</span> | 812 | <span·class="gp">In·[12]:·</span><span·class="n">new_df</span><span·class="o">.</span><span·class="n">dtypes</span> |
808 | <span·class="gh">Out[12]:·</span> | 813 | <span·class="gh">Out[12]:·</span> |
809 | <span·class="go">foo·············int64</span> | 814 | <span·class="go">foo·············int64</span> |
810 | <span·class="go">bar············object</span> | 815 | <span·class="go">bar············object</span> |
811 | <span·class="go">baz····datetime64[ns]</span> | 816 | <span·class="go">baz····datetime64[ns]</span> |
812 | <span·class="go">qux··········category</span> | 817 | <span·class="go">qux··········category</span> |
813 | <span·class="go">dtype:·object</span> | 818 | <span·class="go">Length:·4,·dtype:·object</span> |
814 | </pre></div> | 819 | </pre></div> |
815 | </div> | 820 | </div> |
816 | </section> | 821 | </section> |
817 | <section·id="method-assign-accepts-dependent-arguments"> | 822 | <section·id="method-assign-accepts-dependent-arguments"> |
818 | <span·id="whatsnew-0230-enhancements-assign-dependent"></span><h3>Method·<code·class="docutils·literal·notranslate"><span·class="pre">.assign()</span></code>·accepts·dependent·arguments<a·class="headerlink"·href="#method-assign-accepts-dependent-arguments"·title="Link·to·this·heading">#</a></h3> | 823 | <span·id="whatsnew-0230-enhancements-assign-dependent"></span><h3>Method·<code·class="docutils·literal·notranslate"><span·class="pre">.assign()</span></code>·accepts·dependent·arguments<a·class="headerlink"·href="#method-assign-accepts-dependent-arguments"·title="Link·to·this·heading">#</a></h3> |
819 | <p>The·<a·class="reference·internal"·href="../reference/api/pandas.DataFrame.assign.html#pandas.DataFrame.assign"·title="pandas.DataFrame.assign"><code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">DataFrame.assign()</span></code></a>·now·accepts·dependent·keyword·arguments·for·python·version·later·than·3.6·(see·also·<a·class="reference·external"·href="https://www.python.org/dev/peps/pep-0468/">PEP·468</a>).·Later·keyword·arguments·may·now·refer·to·earlier·ones·if·the·argument·is·a·callable.·See·the | 824 | <p>The·<a·class="reference·internal"·href="../reference/api/pandas.DataFrame.assign.html#pandas.DataFrame.assign"·title="pandas.DataFrame.assign"><code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">DataFrame.assign()</span></code></a>·now·accepts·dependent·keyword·arguments·for·python·version·later·than·3.6·(see·also·<a·class="reference·external"·href="https://www.python.org/dev/peps/pep-0468/">PEP·468</a>).·Later·keyword·arguments·may·now·refer·to·earlier·ones·if·the·argument·is·a·callable.·See·the |
820 | <a·class="reference·internal"·href="../user_guide/dsintro.html#dsintro-chained-assignment"><span·class="std·std-ref">documentation·here</span></a>·(<a·class="extlink-issue·reference·external"·href="https://github.com/pandas-dev/pandas/issues/14207">GH·14207</a>)</p> | 825 | <a·class="reference·internal"·href="../user_guide/dsintro.html#dsintro-chained-assignment"><span·class="std·std-ref">documentation·here</span></a>·(<a·class="extlink-issue·reference·external"·href="https://github.com/pandas-dev/pandas/issues/14207">GH·14207</a>)</p> |
Offset 824, 20 lines modified | Offset 830, 24 lines modified | ||
824 | <span·class="gp">In·[14]:·</span><span·class="n">df</span> | 830 | <span·class="gp">In·[14]:·</span><span·class="n">df</span> |
825 | <span·class="gh">Out[14]:·</span> | 831 | <span·class="gh">Out[14]:·</span> |
826 | <span·class="go">···A</span> | 832 | <span·class="go">···A</span> |
827 | <span·class="go">0··1</span> | 833 | <span·class="go">0··1</span> |
828 | <span·class="go">1··2</span> | 834 | <span·class="go">1··2</span> |
829 | <span·class="go">2··3</span> | 835 | <span·class="go">2··3</span> |
836 | <span·class="go">[3·rows·x·1·columns]</span> | ||
830 | <span·class="gp">In·[15]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">assign</span><span·class="p">(</span><span·class="n">B</span><span·class="o">=</span><span·class="n">df</span><span·class="o">.</span><span·class="n">A</span><span·class="p">,</span>·<span·class="n">C</span><span·class="o">=</span><span·class="k">lambda</span>·<span·class="n">x</span><span·class="p">:</span>·<span·class="n">x</span><span·class="p">[</span><span·class="s1">'A'</span><span·class="p">]</span>·<span·class="o">+</span>·<span·class="n">x</span><span·class="p">[</span><span·class="s1">'B'</span><span·class="p">])</span> | 837 | <span·class="gp">In·[15]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">assign</span><span·class="p">(</span><span·class="n">B</span><span·class="o">=</span><span·class="n">df</span><span·class="o">.</span><span·class="n">A</span><span·class="p">,</span>·<span·class="n">C</span><span·class="o">=</span><span·class="k">lambda</span>·<span·class="n">x</span><span·class="p">:</span>·<span·class="n">x</span><span·class="p">[</span><span·class="s1">'A'</span><span·class="p">]</span>·<span·class="o">+</span>·<span·class="n">x</span><span·class="p">[</span><span·class="s1">'B'</span><span·class="p">])</span> |
831 | <span·class="gh">Out[15]:·</span> | 838 | <span·class="gh">Out[15]:·</span> |
832 | <span·class="go">···A··B··C</span> | 839 | <span·class="go">···A··B··C</span> |
833 | <span·class="go">0··1··1··2</span> | 840 | <span·class="go">0··1··1··2</span> |
834 | <span·class="go">1··2··2··4</span> | 841 | <span·class="go">1··2··2··4</span> |
835 | <span·class="go">2··3··3··6</span> | 842 | <span·class="go">2··3··3··6</span> |
843 | <span·class="go">[3·rows·x·3·columns]</span> | ||
836 | </pre></div> | 844 | </pre></div> |
837 | </div> | 845 | </div> |
838 | <div·class="admonition·warning"> | 846 | <div·class="admonition·warning"> |
839 | <p·class="admonition-title">Warning</p> | 847 | <p·class="admonition-title">Warning</p> |
840 | <p>This·may·subtly·change·the·behavior·of·your·code·when·you’re | 848 | <p>This·may·subtly·change·the·behavior·of·your·code·when·you’re |
841 | using·<code·class="docutils·literal·notranslate"><span·class="pre">.assign()</span></code>·to·update·an·existing·column.·Previously,·callables | 849 | using·<code·class="docutils·literal·notranslate"><span·class="pre">.assign()</span></code>·to·update·an·existing·column.·Previously,·callables |
842 | referring·to·other·variables·being·updated·would·get·the·“old”·values</p> | 850 | referring·to·other·variables·being·updated·would·get·the·“old”·values</p> |
Offset 855, 14 lines modified | Offset 865, 16 lines modified | ||
855 | <p>New·behavior:</p> | 865 | <p>New·behavior:</p> |
856 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[16]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">assign</span><span·class="p">(</span><span·class="n">A</span><span·class="o">=</span><span·class="n">df</span><span·class="o">.</span><span·class="n">A</span>·<span·class="o">+</span>·<span·class="mi">1</span><span·class="p">,</span>·<span·class="n">C</span><span·class="o">=</span><span·class="k">lambda</span>·<span·class="n">df</span><span·class="p">:</span>·<span·class="n">df</span><span·class="o">.</span><span·class="n">A</span>·<span·class="o">*</span>·<span·class="o">-</span><span·class="mi">1</span><span·class="p">)</span> | 866 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[16]:·</span><span·class="n">df</span><span·class="o">.</span><span·class="n">assign</span><span·class="p">(</span><span·class="n">A</span><span·class="o">=</span><span·class="n">df</span><span·class="o">.</span><span·class="n">A</span>·<span·class="o">+</span>·<span·class="mi">1</span><span·class="p">,</span>·<span·class="n">C</span><span·class="o">=</span><span·class="k">lambda</span>·<span·class="n">df</span><span·class="p">:</span>·<span·class="n">df</span><span·class="o">.</span><span·class="n">A</span>·<span·class="o">*</span>·<span·class="o">-</span><span·class="mi">1</span><span·class="p">)</span> |
857 | <span·class="gh">Out[16]:·</span> | 867 | <span·class="gh">Out[16]:·</span> |
858 | <span·class="go">···A··C</span> | 868 | <span·class="go">···A··C</span> |
859 | <span·class="go">0··2·-2</span> | 869 | <span·class="go">0··2·-2</span> |
860 | <span·class="go">1··3·-3</span> | 870 | <span·class="go">1··3·-3</span> |
861 | <span·class="go">2··4·-4</span> | 871 | <span·class="go">2··4·-4</span> |
872 | <span·class="go">[3·rows·x·2·columns]</span> | ||
862 | </pre></div> | 873 | </pre></div> |
863 | </div> | 874 | </div> |
864 | </div> | 875 | </div> |
865 | </section> | 876 | </section> |
866 | <section·id="merging-on-a-combination-of-columns-and-index-levels"> | 877 | <section·id="merging-on-a-combination-of-columns-and-index-levels"> |
867 | <span·id="whatsnew-0230-enhancements-merge-on-columns-and-levels"></span><h3>Merging·on·a·combination·of·columns·and·index·levels<a·class="headerlink"·href="#merging-on-a-combination-of-columns-and-index-levels"·title="Link·to·this·heading">#</a></h3> | 878 | <span·id="whatsnew-0230-enhancements-merge-on-columns-and-levels"></span><h3>Merging·on·a·combination·of·columns·and·index·levels<a·class="headerlink"·href="#merging-on-a-combination-of-columns-and-index-levels"·title="Link·to·this·heading">#</a></h3> |
868 | <p>Strings·passed·to·<a·class="reference·internal"·href="../reference/api/pandas.DataFrame.merge.html#pandas.DataFrame.merge"·title="pandas.DataFrame.merge"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">DataFrame.merge()</span></code></a>·as·the·<code·class="docutils·literal·notranslate"><span·class="pre">on</span></code>,·<code·class="docutils·literal·notranslate"><span·class="pre">left_on</span></code>,·and·<code·class="docutils·literal·notranslate"><span·class="pre">right_on</span></code> | 879 | <p>Strings·passed·to·<a·class="reference·internal"·href="../reference/api/pandas.DataFrame.merge.html#pandas.DataFrame.merge"·title="pandas.DataFrame.merge"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">DataFrame.merge()</span></code></a>·as·the·<code·class="docutils·literal·notranslate"><span·class="pre">on</span></code>,·<code·class="docutils·literal·notranslate"><span·class="pre">left_on</span></code>,·and·<code·class="docutils·literal·notranslate"><span·class="pre">right_on</span></code> |
Offset 890, 14 lines modified | Offset 902, 16 lines modified | ||
890 | <span·class="gp">In·[21]:·</span><span·class="n">left</span><span·class="o">.</span><span·class="n">merge</span><span·class="p">(</span><span·class="n">right</span><span·class="p">,</span>·<span·class="n">on</span><span·class="o">=</span><span·class="p">[</span><span·class="s1">'key1'</span><span·class="p">,</span>·<span·class="s1">'key2'</span><span·class="p">])</span> | 902 | <span·class="gp">In·[21]:·</span><span·class="n">left</span><span·class="o">.</span><span·class="n">merge</span><span·class="p">(</span><span·class="n">right</span><span·class="p">,</span>·<span·class="n">on</span><span·class="o">=</span><span·class="p">[</span><span·class="s1">'key1'</span><span·class="p">,</span>·<span·class="s1">'key2'</span><span·class="p">])</span> |
891 | <span·class="gh">Out[21]:·</span> | 903 | <span·class="gh">Out[21]:·</span> |
892 | <span·class="go">·······A···B·key2···C···D</span> | 904 | <span·class="go">·······A···B·key2···C···D</span> |
893 | <span·class="go">key1·····················</span> | 905 | <span·class="go">key1·····················</span> |
894 | <span·class="go">K0····A0··B0···K0··C0··D0</span> | 906 | <span·class="go">K0····A0··B0···K0··C0··D0</span> |
895 | <span·class="go">K1····A2··B2···K0··C1··D1</span> | 907 | <span·class="go">K1····A2··B2···K0··C1··D1</span> |
896 | <span·class="go">K2····A3··B3···K1··C3··D3</span> | 908 | <span·class="go">K2····A3··B3···K1··C3··D3</span> |
909 | <span·class="go">[3·rows·x·5·columns]</span> | ||
897 | </pre></div> | 910 | </pre></div> |
898 | </div> | 911 | </div> |
899 | </section> | 912 | </section> |
900 | <section·id="sorting-by-a-combination-of-columns-and-index-levels"> | 913 | <section·id="sorting-by-a-combination-of-columns-and-index-levels"> |
901 | <span·id="whatsnew-0230-enhancements-sort-by-columns-and-levels"></span><h3>Sorting·by·a·combination·of·columns·and·index·levels<a·class="headerlink"·href="#sorting-by-a-combination-of-columns-and-index-levels"·title="Link·to·this·heading">#</a></h3> | 914 | <span·id="whatsnew-0230-enhancements-sort-by-columns-and-levels"></span><h3>Sorting·by·a·combination·of·columns·and·index·levels<a·class="headerlink"·href="#sorting-by-a-combination-of-columns-and-index-levels"·title="Link·to·this·heading">#</a></h3> |
Max diff block lines reached; 40918/51191 bytes (79.93%) of diff not shown. |
Offset 210, 42 lines modified | Offset 210, 46 lines modified | ||
210 | ·····foo·bar········baz·qux | 210 | ·····foo·bar········baz·qux |
211 | idx | 211 | idx |
212 | 0······1···a·2018-01-01···a | 212 | 0······1···a·2018-01-01···a |
213 | 1······2···b·2018-01-02···b | 213 | 1······2···b·2018-01-02···b |
214 | 2······3···c·2018-01-03···c | 214 | 2······3···c·2018-01-03···c |
215 | 3······4···d·2018-01-04···c | 215 | 3······4···d·2018-01-04···c |
216 | [4·rows·x·4·columns] | ||
216 | In·[3]:·df.dtypes | 217 | In·[3]:·df.dtypes |
217 | Out[3]: | 218 | Out[3]: |
218 | foo·············int64 | 219 | foo·············int64 |
219 | bar············object | 220 | bar············object |
220 | baz····datetime64[ns] | 221 | baz····datetime64[ns] |
221 | qux··········category | 222 | qux··········category |
222 | dtype:·object | 223 | Length:·4,·dtype:·object |
223 | In·[4]:·df.to_json('test.json',·orient='table') | 224 | In·[4]:·df.to_json('test.json',·orient='table') |
224 | In·[5]:·new_df·=·pd.read_json('test.json',·orient='table') | 225 | In·[5]:·new_df·=·pd.read_json('test.json',·orient='table') |
225 | In·[6]:·new_df | 226 | In·[6]:·new_df |
226 | Out[6]: | 227 | Out[6]: |
227 | ·····foo·bar········baz·qux | 228 | ·····foo·bar········baz·qux |
228 | idx | 229 | idx |
229 | 0······1···a·2018-01-01···a | 230 | 0······1···a·2018-01-01···a |
230 | 1······2···b·2018-01-02···b | 231 | 1······2···b·2018-01-02···b |
231 | 2······3···c·2018-01-03···c | 232 | 2······3···c·2018-01-03···c |
232 | 3······4···d·2018-01-04···c | 233 | 3······4···d·2018-01-04···c |
234 | [4·rows·x·4·columns] | ||
233 | In·[7]:·new_df.dtypes | 235 | In·[7]:·new_df.dtypes |
234 | Out[7]: | 236 | Out[7]: |
235 | foo·············int64 | 237 | foo·············int64 |
236 | bar············object | 238 | bar············object |
237 | baz····datetime64[ns] | 239 | baz····datetime64[ns] |
238 | qux··········category | 240 | qux··········category |
239 | dtype:·object | 241 | Length:·4,·dtype:·object |
240 | Please·note·that·the·string·index·is·not·supported·with·the·round·trip·format, | 242 | Please·note·that·the·string·index·is·not·supported·with·the·round·trip·format, |
241 | as·it·is·used·by·default·in·write_json·to·indicate·a·missing·index·name. | 243 | as·it·is·used·by·default·in·write_json·to·indicate·a·missing·index·name. |
242 | In·[8]:·df.index.name·=·'index' | 244 | In·[8]:·df.index.name·=·'index' |
243 | In·[9]:·df.to_json('test.json',·orient='table') | 245 | In·[9]:·df.to_json('test.json',·orient='table') |
244 | In·[10]:·new_df·=·pd.read_json('test.json',·orient='table') | 246 | In·[10]:·new_df·=·pd.read_json('test.json',·orient='table') |
Offset 254, 41 lines modified | Offset 258, 47 lines modified | ||
254 | Out[11]: | 258 | Out[11]: |
255 | ···foo·bar········baz·qux | 259 | ···foo·bar········baz·qux |
256 | 0····1···a·2018-01-01···a | 260 | 0····1···a·2018-01-01···a |
257 | 1····2···b·2018-01-02···b | 261 | 1····2···b·2018-01-02···b |
258 | 2····3···c·2018-01-03···c | 262 | 2····3···c·2018-01-03···c |
259 | 3····4···d·2018-01-04···c | 263 | 3····4···d·2018-01-04···c |
264 | [4·rows·x·4·columns] | ||
260 | In·[12]:·new_df.dtypes | 265 | In·[12]:·new_df.dtypes |
261 | Out[12]: | 266 | Out[12]: |
262 | foo·············int64 | 267 | foo·············int64 |
263 | bar············object | 268 | bar············object |
264 | baz····datetime64[ns] | 269 | baz····datetime64[ns] |
265 | qux··········category | 270 | qux··········category |
266 | dtype:·object | 271 | Length:·4,·dtype:·object |
267 | *\x8**\x8**\x8**\x8*·M\x8Me\x8et\x8th\x8ho\x8od\x8d·.\x8.a\x8as\x8ss\x8si\x8ig\x8gn\x8n(\x8()\x8)·a\x8ac\x8cc\x8ce\x8ep\x8pt\x8ts\x8s·d\x8de\x8ep\x8pe\x8en\x8nd\x8de\x8en\x8nt\x8t·a\x8ar\x8rg\x8gu\x8um\x8me\x8en\x8nt\x8ts\x8s_\x8#\x8#·*\x8**\x8**\x8**\x8* | 272 | *\x8**\x8**\x8**\x8*·M\x8Me\x8et\x8th\x8ho\x8od\x8d·.\x8.a\x8as\x8ss\x8si\x8ig\x8gn\x8n(\x8()\x8)·a\x8ac\x8cc\x8ce\x8ep\x8pt\x8ts\x8s·d\x8de\x8ep\x8pe\x8en\x8nd\x8de\x8en\x8nt\x8t·a\x8ar\x8rg\x8gu\x8um\x8me\x8en\x8nt\x8ts\x8s_\x8#\x8#·*\x8**\x8**\x8**\x8* |
268 | The·_\x8D_\x8a_\x8t_\x8a_\x8F_\x8r_\x8a_\x8m_\x8e_\x8._\x8a_\x8s_\x8s_\x8i_\x8g_\x8n_\x8(_\x8)·now·accepts·dependent·keyword·arguments·for·python | 273 | The·_\x8D_\x8a_\x8t_\x8a_\x8F_\x8r_\x8a_\x8m_\x8e_\x8._\x8a_\x8s_\x8s_\x8i_\x8g_\x8n_\x8(_\x8)·now·accepts·dependent·keyword·arguments·for·python |
269 | version·later·than·3.6·(see·also·_\x8P_\x8E_\x8P_\x8·_\x84_\x86_\x88).·Later·keyword·arguments·may·now | 274 | version·later·than·3.6·(see·also·_\x8P_\x8E_\x8P_\x8·_\x84_\x86_\x88).·Later·keyword·arguments·may·now |
270 | refer·to·earlier·ones·if·the·argument·is·a·callable.·See·the·_\x8d_\x8o_\x8c_\x8u_\x8m_\x8e_\x8n_\x8t_\x8a_\x8t_\x8i_\x8o_\x8n_\x8·_\x8h_\x8e_\x8r_\x8e | 275 | refer·to·earlier·ones·if·the·argument·is·a·callable.·See·the·_\x8d_\x8o_\x8c_\x8u_\x8m_\x8e_\x8n_\x8t_\x8a_\x8t_\x8i_\x8o_\x8n_\x8·_\x8h_\x8e_\x8r_\x8e |
271 | (_\x8G_\x8H_\x8·_\x81_\x84_\x82_\x80_\x87) | 276 | (_\x8G_\x8H_\x8·_\x81_\x84_\x82_\x80_\x87) |
272 | In·[13]:·df·=·pd.DataFrame({'A':·[1,·2,·3]}) | 277 | In·[13]:·df·=·pd.DataFrame({'A':·[1,·2,·3]}) |
273 | In·[14]:·df | 278 | In·[14]:·df |
274 | Out[14]: | 279 | Out[14]: |
275 | ···A | 280 | ···A |
276 | 0··1 | 281 | 0··1 |
277 | 1··2 | 282 | 1··2 |
278 | 2··3 | 283 | 2··3 |
284 | [3·rows·x·1·columns] | ||
279 | In·[15]:·df.assign(B=df.A,·C=lambda·x:·x['A']·+·x['B']) | 285 | In·[15]:·df.assign(B=df.A,·C=lambda·x:·x['A']·+·x['B']) |
280 | Out[15]: | 286 | Out[15]: |
281 | ···A··B··C | 287 | ···A··B··C |
282 | 0··1··1··2 | 288 | 0··1··1··2 |
283 | 1··2··2··4 | 289 | 1··2··2··4 |
284 | 2··3··3··6 | 290 | 2··3··3··6 |
291 | [3·rows·x·3·columns] | ||
285 | Warning | 292 | Warning |
286 | This·may·subtly·change·the·behavior·of·your·code·when·you’re·using·.assign()·to | 293 | This·may·subtly·change·the·behavior·of·your·code·when·you’re·using·.assign()·to |
287 | update·an·existing·column.·Previously,·callables·referring·to·other·variables | 294 | update·an·existing·column.·Previously,·callables·referring·to·other·variables |
288 | being·updated·would·get·the·“old”·values | 295 | being·updated·would·get·the·“old”·values |
289 | Previous·behavior: | 296 | Previous·behavior: |
290 | In·[2]:·df·=·pd.DataFrame({"A":·[1,·2,·3]}) | 297 | In·[2]:·df·=·pd.DataFrame({"A":·[1,·2,·3]}) |
Offset 301, 14 lines modified | Offset 311, 16 lines modified | ||
301 | New·behavior: | 311 | New·behavior: |
302 | In·[16]:·df.assign(A=df.A·+·1,·C=lambda·df:·df.A·*·-1) | 312 | In·[16]:·df.assign(A=df.A·+·1,·C=lambda·df:·df.A·*·-1) |
303 | Out[16]: | 313 | Out[16]: |
304 | ···A··C | 314 | ···A··C |
305 | 0··2·-2 | 315 | 0··2·-2 |
306 | 1··3·-3 | 316 | 1··3·-3 |
307 | 2··4·-4 | 317 | 2··4·-4 |
318 | [3·rows·x·2·columns] | ||
308 | *\x8**\x8**\x8**\x8*·M\x8Me\x8er\x8rg\x8gi\x8in\x8ng\x8g·o\x8on\x8n·a\x8a·c\x8co\x8om\x8mb\x8bi\x8in\x8na\x8at\x8ti\x8io\x8on\x8n·o\x8of\x8f·c\x8co\x8ol\x8lu\x8um\x8mn\x8ns\x8s·a\x8an\x8nd\x8d·i\x8in\x8nd\x8de\x8ex\x8x·l\x8le\x8ev\x8ve\x8el\x8ls\x8s_\x8#\x8#·*\x8**\x8**\x8**\x8* | 319 | *\x8**\x8**\x8**\x8*·M\x8Me\x8er\x8rg\x8gi\x8in\x8ng\x8g·o\x8on\x8n·a\x8a·c\x8co\x8om\x8mb\x8bi\x8in\x8na\x8at\x8ti\x8io\x8on\x8n·o\x8of\x8f·c\x8co\x8ol\x8lu\x8um\x8mn\x8ns\x8s·a\x8an\x8nd\x8d·i\x8in\x8nd\x8de\x8ex\x8x·l\x8le\x8ev\x8ve\x8el\x8ls\x8s_\x8#\x8#·*\x8**\x8**\x8**\x8* |
309 | Strings·passed·to·_\x8D_\x8a_\x8t_\x8a_\x8F_\x8r_\x8a_\x8m_\x8e_\x8._\x8m_\x8e_\x8r_\x8g_\x8e_\x8(_\x8)·as·the·on,·left_on,·and·right_on·parameters | 320 | Strings·passed·to·_\x8D_\x8a_\x8t_\x8a_\x8F_\x8r_\x8a_\x8m_\x8e_\x8._\x8m_\x8e_\x8r_\x8g_\x8e_\x8(_\x8)·as·the·on,·left_on,·and·right_on·parameters |
310 | may·now·refer·to·either·column·names·or·index·level·names.·This·enables·merging | 321 | may·now·refer·to·either·column·names·or·index·level·names.·This·enables·merging |
311 | DataFrame·instances·on·a·combination·of·index·levels·and·columns·without | 322 | DataFrame·instances·on·a·combination·of·index·levels·and·columns·without |
312 | resetting·indexes.·See·the·_\x8M_\x8e_\x8r_\x8g_\x8e_\x8·_\x8o_\x8n_\x8·_\x8c_\x8o_\x8l_\x8u_\x8m_\x8n_\x8s_\x8·_\x8a_\x8n_\x8d_\x8·_\x8l_\x8e_\x8v_\x8e_\x8l_\x8s·documentation·section. | 323 | resetting·indexes.·See·the·_\x8M_\x8e_\x8r_\x8g_\x8e_\x8·_\x8o_\x8n_\x8·_\x8c_\x8o_\x8l_\x8u_\x8m_\x8n_\x8s_\x8·_\x8a_\x8n_\x8d_\x8·_\x8l_\x8e_\x8v_\x8e_\x8l_\x8s·documentation·section. |
313 | (_\x8G_\x8H_\x8·_\x81_\x84_\x83_\x85_\x85) | 324 | (_\x8G_\x8H_\x8·_\x81_\x84_\x83_\x85_\x85) |
314 | In·[17]:·left_index·=·pd.Index(['K0',·'K0',·'K1',·'K2'],·name='key1') | 325 | In·[17]:·left_index·=·pd.Index(['K0',·'K0',·'K1',·'K2'],·name='key1') |
Offset 330, 14 lines modified | Offset 342, 16 lines modified | ||
330 | In·[21]:·left.merge(right,·on=['key1',·'key2']) | 342 | In·[21]:·left.merge(right,·on=['key1',·'key2']) |
331 | Out[21]: | 343 | Out[21]: |
332 | ·······A···B·key2···C···D | 344 | ·······A···B·key2···C···D |
333 | key1 | 345 | key1 |
334 | K0····A0··B0···K0··C0··D0 | 346 | K0····A0··B0···K0··C0··D0 |
335 | K1····A2··B2···K0··C1··D1 | 347 | K1····A2··B2···K0··C1··D1 |
336 | K2····A3··B3···K1··C3··D3 | 348 | K2····A3··B3···K1··C3··D3 |
349 | [3·rows·x·5·columns] | ||
337 | *\x8**\x8**\x8**\x8*·S\x8So\x8or\x8rt\x8ti\x8in\x8ng\x8g·b\x8by\x8y·a\x8a·c\x8co\x8om\x8mb\x8bi\x8in\x8na\x8at\x8ti\x8io\x8on\x8n·o\x8of\x8f·c\x8co\x8ol\x8lu\x8um\x8mn\x8ns\x8s·a\x8an\x8nd\x8d·i\x8in\x8nd\x8de\x8ex\x8x·l\x8le\x8ev\x8ve\x8el\x8ls\x8s_\x8#\x8#·*\x8**\x8**\x8**\x8* | 350 | *\x8**\x8**\x8**\x8*·S\x8So\x8or\x8rt\x8ti\x8in\x8ng\x8g·b\x8by\x8y·a\x8a·c\x8co\x8om\x8mb\x8bi\x8in\x8na\x8at\x8ti\x8io\x8on\x8n·o\x8of\x8f·c\x8co\x8ol\x8lu\x8um\x8mn\x8ns\x8s·a\x8an\x8nd\x8d·i\x8in\x8nd\x8de\x8ex\x8x·l\x8le\x8ev\x8ve\x8el\x8ls\x8s_\x8#\x8#·*\x8**\x8**\x8**\x8* |
338 | Strings·passed·to·_\x8D_\x8a_\x8t_\x8a_\x8F_\x8r_\x8a_\x8m_\x8e_\x8._\x8s_\x8o_\x8r_\x8t_\x8__\x8v_\x8a_\x8l_\x8u_\x8e_\x8s_\x8(_\x8)·as·the·by·parameter·may·now·refer·to | 351 | Strings·passed·to·_\x8D_\x8a_\x8t_\x8a_\x8F_\x8r_\x8a_\x8m_\x8e_\x8._\x8s_\x8o_\x8r_\x8t_\x8__\x8v_\x8a_\x8l_\x8u_\x8e_\x8s_\x8(_\x8)·as·the·by·parameter·may·now·refer·to |
339 | either·column·names·or·index·level·names.·This·enables·sorting·DataFrame | 352 | either·column·names·or·index·level·names.·This·enables·sorting·DataFrame |
340 | instances·by·a·combination·of·index·levels·and·columns·without·resetting | 353 | instances·by·a·combination·of·index·levels·and·columns·without·resetting |
341 | indexes.·See·the·_\x8S_\x8o_\x8r_\x8t_\x8i_\x8n_\x8g_\x8·_\x8b_\x8y_\x8·_\x8I_\x8n_\x8d_\x8e_\x8x_\x8e_\x8s_\x8·_\x8a_\x8n_\x8d_\x8·_\x8V_\x8a_\x8l_\x8u_\x8e_\x8s·documentation·section.·(_\x8G_\x8H | 354 | indexes.·See·the·_\x8S_\x8o_\x8r_\x8t_\x8i_\x8n_\x8g_\x8·_\x8b_\x8y_\x8·_\x8I_\x8n_\x8d_\x8e_\x8x_\x8e_\x8s_\x8·_\x8a_\x8n_\x8d_\x8·_\x8V_\x8a_\x8l_\x8u_\x8e_\x8s·documentation·section.·(_\x8G_\x8H |
342 | _\x81_\x84_\x83_\x85_\x83) | 355 | _\x81_\x84_\x83_\x85_\x83) |
Max diff block lines reached; 13348/17569 bytes (75.97%) of diff not shown. |
Offset 820, 18 lines modified | Offset 820, 18 lines modified | ||
820 | a·new·ndarray·of·period·objects·each·time.</p> | 820 | a·new·ndarray·of·period·objects·each·time.</p> |
821 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[18]:·</span><span·class="n">idx</span><span·class="o">.</span><span·class="n">values</span> | 821 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[18]:·</span><span·class="n">idx</span><span·class="o">.</span><span·class="n">values</span> |
822 | <span·class="gh">Out[18]:·</span> | 822 | <span·class="gh">Out[18]:·</span> |
823 | <span·class="go">array([Period('2000-01-01',·'D'),·Period('2000-01-02',·'D'),</span> | 823 | <span·class="go">array([Period('2000-01-01',·'D'),·Period('2000-01-02',·'D'),</span> |
824 | <span·class="go">·······Period('2000-01-03',·'D'),·Period('2000-01-04',·'D')],·dtype=object)</span> | 824 | <span·class="go">·······Period('2000-01-03',·'D'),·Period('2000-01-04',·'D')],·dtype=object)</span> |
825 | <span·class="gp">In·[19]:·</span><span·class="nb">id</span><span·class="p">(</span><span·class="n">idx</span><span·class="o">.</span><span·class="n">values</span><span·class="p">)</span> | 825 | <span·class="gp">In·[19]:·</span><span·class="nb">id</span><span·class="p">(</span><span·class="n">idx</span><span·class="o">.</span><span·class="n">values</span><span·class="p">)</span> |
826 | <span·class="gh">Out[19]:·</span><span·class="go">1 | 826 | <span·class="gh">Out[19]:·</span><span·class="go">139634167129328</span> |
827 | <span·class="gp">In·[20]:·</span><span·class="nb">id</span><span·class="p">(</span><span·class="n">idx</span><span·class="o">.</span><span·class="n">values</span><span·class="p">)</span> | 827 | <span·class="gp">In·[20]:·</span><span·class="nb">id</span><span·class="p">(</span><span·class="n">idx</span><span·class="o">.</span><span·class="n">values</span><span·class="p">)</span> |
828 | <span·class="gh">Out[20]:·</span><span·class="go">1 | 828 | <span·class="gh">Out[20]:·</span><span·class="go">139634167129328</span> |
829 | </pre></div> | 829 | </pre></div> |
830 | </div> | 830 | </div> |
831 | <p>If·you·need·an·actual·NumPy·array,·use·<a·class="reference·internal"·href="../reference/api/pandas.Series.to_numpy.html#pandas.Series.to_numpy"·title="pandas.Series.to_numpy"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">Series.to_numpy()</span></code></a>·or·<code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">Index.to_numpy()</span></code>.</p> | 831 | <p>If·you·need·an·actual·NumPy·array,·use·<a·class="reference·internal"·href="../reference/api/pandas.Series.to_numpy.html#pandas.Series.to_numpy"·title="pandas.Series.to_numpy"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">Series.to_numpy()</span></code></a>·or·<code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">Index.to_numpy()</span></code>.</p> |
832 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[21]:·</span><span·class="n">idx</span><span·class="o">.</span><span·class="n">to_numpy</span><span·class="p">()</span> | 832 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[21]:·</span><span·class="n">idx</span><span·class="o">.</span><span·class="n">to_numpy</span><span·class="p">()</span> |
833 | <span·class="gh">Out[21]:·</span> | 833 | <span·class="gh">Out[21]:·</span> |
834 | <span·class="go">array([Period('2000-01-01',·'D'),·Period('2000-01-02',·'D'),</span> | 834 | <span·class="go">array([Period('2000-01-01',·'D'),·Period('2000-01-02',·'D'),</span> |
835 | <span·class="go">·······Period('2000-01-03',·'D'),·Period('2000-01-04',·'D')],·dtype=object)</span> | 835 | <span·class="go">·······Period('2000-01-03',·'D'),·Period('2000-01-04',·'D')],·dtype=object)</span> |
Offset 268, 18 lines modified | Offset 268, 18 lines modified | ||
268 | each·time. | 268 | each·time. |
269 | In·[18]:·idx.values | 269 | In·[18]:·idx.values |
270 | Out[18]: | 270 | Out[18]: |
271 | array([Period('2000-01-01',·'D'),·Period('2000-01-02',·'D'), | 271 | array([Period('2000-01-01',·'D'),·Period('2000-01-02',·'D'), |
272 | ·······Period('2000-01-03',·'D'),·Period('2000-01-04',·'D')],·dtype=object) | 272 | ·······Period('2000-01-03',·'D'),·Period('2000-01-04',·'D')],·dtype=object) |
273 | In·[19]:·id(idx.values) | 273 | In·[19]:·id(idx.values) |
274 | Out[19]:·1 | 274 | Out[19]:·139634167129328 |
275 | In·[20]:·id(idx.values) | 275 | In·[20]:·id(idx.values) |
276 | Out[20]:·1 | 276 | Out[20]:·139634167129328 |
277 | If·you·need·an·actual·NumPy·array,·use·_\x8S_\x8e_\x8r_\x8i_\x8e_\x8s_\x8._\x8t_\x8o_\x8__\x8n_\x8u_\x8m_\x8p_\x8y_\x8(_\x8)·or·Index.to_numpy(). | 277 | If·you·need·an·actual·NumPy·array,·use·_\x8S_\x8e_\x8r_\x8i_\x8e_\x8s_\x8._\x8t_\x8o_\x8__\x8n_\x8u_\x8m_\x8p_\x8y_\x8(_\x8)·or·Index.to_numpy(). |
278 | In·[21]:·idx.to_numpy() | 278 | In·[21]:·idx.to_numpy() |
279 | Out[21]: | 279 | Out[21]: |
280 | array([Period('2000-01-01',·'D'),·Period('2000-01-02',·'D'), | 280 | array([Period('2000-01-01',·'D'),·Period('2000-01-02',·'D'), |
281 | ·······Period('2000-01-03',·'D'),·Period('2000-01-04',·'D')],·dtype=object) | 281 | ·······Period('2000-01-03',·'D'),·Period('2000-01-04',·'D')],·dtype=object) |
282 | In·[22]:·pd.Series(idx).to_numpy() | 282 | In·[22]:·pd.Series(idx).to_numpy() |
Offset 1, 3 lines modified | Offset 1, 3 lines modified | ||
1 | -rw-r--r--···0········0········0········4·2025-03-29·13:01:52.000000·debian-binary | 1 | -rw-r--r--···0········0········0········4·2025-03-29·13:01:52.000000·debian-binary |
2 | -rw-r--r--···0········0········0·····2012·2025-03-29·13:01:52.000000·control.tar.xz | 2 | -rw-r--r--···0········0········0·····2012·2025-03-29·13:01:52.000000·control.tar.xz |
3 | -rw-r--r--···0········0········0··459 | 3 | -rw-r--r--···0········0········0··4592500·2025-03-29·13:01:52.000000·data.tar.xz |
Offset 1, 4 lines modified | Offset 1, 4 lines modified | ||
1 | Displaying·notes·found·in:·.note.gnu.build-id | 1 | Displaying·notes·found·in:·.note.gnu.build-id |
2 | ··Owner················Data·size·» Description | 2 | ··Owner················Data·size·» Description |
3 | ··GNU··················0x00000014» NT_GNU_BUILD_ID·(unique·build·ID·bitstring)» ····Build·ID:· | 3 | ··GNU··················0x00000014» NT_GNU_BUILD_ID·(unique·build·ID·bitstring)» ····Build·ID:·14a30e770cabf67c4565ececb7ee6fa6fe86df11 |
Offset 1, 7 lines modified | Offset 1, 7 lines modified | ||
1 | Hex·dump·of·section·'.gnu_debuglink': | 1 | Hex·dump·of·section·'.gnu_debuglink': |
2 | ··0x00000000·36663363·65363931·34633130·32613764·6f3ce6914c102a7d | ||
3 | ··0x000000 | 2 | ··0x00000000·61333065·37373063·61626636·37633435·a30e770cabf67c45 |
3 | ··0x00000010·36356563·65636237·65653666·61366665·65ececb7ee6fa6fe | ||
4 | ··0x00000020· | 4 | ··0x00000020·38366466·31312e64·65627567·00000000·86df11.debug.... |
5 | ··0x00000030· | 5 | ··0x00000030·1067fcc7····························.g.. |
Offset 1, 3 lines modified | Offset 1, 3 lines modified | ||
1 | -rw-r--r--···0········0········0········4·2025-03-29·13:01:52.000000·debian-binary | 1 | -rw-r--r--···0········0········0········4·2025-03-29·13:01:52.000000·debian-binary |
2 | -rw-r--r--···0········0········0·····2592·2025-03-29·13:01:52.000000·control.tar.xz | 2 | -rw-r--r--···0········0········0·····2592·2025-03-29·13:01:52.000000·control.tar.xz |
3 | -rw-r--r--···0········0········0·3596 | 3 | -rw-r--r--···0········0········0·35961648·2025-03-29·13:01:52.000000·data.tar.xz |
Offset 6, 8 lines modified | Offset 6, 8 lines modified | ||
6 | Maintainer:·Debian·Science·Team·<debian-science-maintainers@lists.alioth.debian.org> | 6 | Maintainer:·Debian·Science·Team·<debian-science-maintainers@lists.alioth.debian.org> |
7 | Installed-Size:·37765 | 7 | Installed-Size:·37765 |
8 | Depends:·python3-pandas-lib·(=·2.2.3+dfsg-9) | 8 | Depends:·python3-pandas-lib·(=·2.2.3+dfsg-9) |
9 | Section:·debug | 9 | Section:·debug |
10 | Priority:·optional | 10 | Priority:·optional |
11 | Multi-Arch:·same | 11 | Multi-Arch:·same |
12 | Description:·debug·symbols·for·python3-pandas-lib | 12 | Description:·debug·symbols·for·python3-pandas-lib |
13 | Build-Ids:·03072ac6285f3cdecc97c56f73195796c99eb5a1·039d81c8392105cfeada28725f4f8bb86d77108d·0482d4bc54b0c73c79c5965e6a097680df95e1e9·13da8c23e747598e5b49c7a81abd8ad4ad82ba8c·1568497f0e7b37e4f0d51e623be28ace97af6e02·2195dfbc44b5d37b6d346d720095437da204af6d·219e8350ad3213ddf26672a7e323f58757a06cfc·2387bddb58dac9492927b7d12434d8d9a65d0291·239b6539dccd1b676d4115aae864ea8639c66b1b·2a2bf3b | 13 | Build-Ids:·03072ac6285f3cdecc97c56f73195796c99eb5a1·039d81c8392105cfeada28725f4f8bb86d77108d·0482d4bc54b0c73c79c5965e6a097680df95e1e9·13da8c23e747598e5b49c7a81abd8ad4ad82ba8c·14a30e770cabf67c4565ececb7ee6fa6fe86df11·1568497f0e7b37e4f0d51e623be28ace97af6e02·2195dfbc44b5d37b6d346d720095437da204af6d·219e8350ad3213ddf26672a7e323f58757a06cfc·2387bddb58dac9492927b7d12434d8d9a65d0291·239b6539dccd1b676d4115aae864ea8639c66b1b·2a2bf3b959b[·...·truncated·by·diffoscope;·len:·480,·SHA:·28c2a563c1700d885de9ef929c5a89b5eafd3e6120e03071cbcdace11f47fb97·...·]·8e70f1378e1368037f7fcb36dced9a766552392e·9329a55b613bdd05d65c335e31b22820cb1a2784·96d18a0962b96e32efbfa4c6e4820d24ccd1a1c7·9b583708a549fac351d48db574ba1a92347ec740·af9c3068c8e6d74c464dbaecbd2210d530822d13·b86d12552068069a1c2ac5cd02b493e55b31ff42·bf108dca811f6031a56a39bb620bcadb486f2b66·c06c03e4862c3a3b1fcc00e95e35ff948a16658a·c5df63e77b3cf9ddd49c62be5d55ea12ac6eb881·cb0123ee4b8aee1889a6c7a03205940a43d5c295·cd5741c7fa176d8d5526e0d9c31d49a8ff1f6b2a·d0462d45917131517ad38d8ecc049eb1807d1c45·d0b68179f627b3988d80412047846bdf596c7de5·d3cccbba0e4719680a698e0b42401309696710fe·dd43473b6efc36ee0a6562c8b989806cab8dd824·ddd7383a3189b320d5985500332c4b64e7fdc66f·e262a33bc2393b8ba642c9d3ddebbea9066d3d0e·ed2b0630369fcb93df7a9b595cc10086ca74e96a·f9ccf3eade678145036662673f5f31ca569ddb3b·fb11da8dbc2e062c537c80a9d8f82f3fa640bdc5·fe94b593a1fdb64219e593e5a2b31f767976f84a·ffc4a211d844388aa11750c4b543fadbacea25dc |
Offset 1, 11 lines modified | Offset 1, 12 lines modified | ||
1 | usr/lib/debug/.build-id/03/072ac6285f3cdecc97c56f73195796c99eb5a1.debug | 1 | usr/lib/debug/.build-id/03/072ac6285f3cdecc97c56f73195796c99eb5a1.debug |
2 | usr/lib/debug/.build-id/03/9d81c8392105cfeada28725f4f8bb86d77108d.debug | 2 | usr/lib/debug/.build-id/03/9d81c8392105cfeada28725f4f8bb86d77108d.debug |
3 | usr/lib/debug/.build-id/04/82d4bc54b0c73c79c5965e6a097680df95e1e9.debug | 3 | usr/lib/debug/.build-id/04/82d4bc54b0c73c79c5965e6a097680df95e1e9.debug |
4 | usr/lib/debug/.build-id/13/da8c23e747598e5b49c7a81abd8ad4ad82ba8c.debug | 4 | usr/lib/debug/.build-id/13/da8c23e747598e5b49c7a81abd8ad4ad82ba8c.debug |
5 | usr/lib/debug/.build-id/14/a30e770cabf67c4565ececb7ee6fa6fe86df11.debug | ||
5 | usr/lib/debug/.build-id/15/68497f0e7b37e4f0d51e623be28ace97af6e02.debug | 6 | usr/lib/debug/.build-id/15/68497f0e7b37e4f0d51e623be28ace97af6e02.debug |
6 | usr/lib/debug/.build-id/21/95dfbc44b5d37b6d346d720095437da204af6d.debug | 7 | usr/lib/debug/.build-id/21/95dfbc44b5d37b6d346d720095437da204af6d.debug |
7 | usr/lib/debug/.build-id/21/9e8350ad3213ddf26672a7e323f58757a06cfc.debug | 8 | usr/lib/debug/.build-id/21/9e8350ad3213ddf26672a7e323f58757a06cfc.debug |
8 | usr/lib/debug/.build-id/23/87bddb58dac9492927b7d12434d8d9a65d0291.debug | 9 | usr/lib/debug/.build-id/23/87bddb58dac9492927b7d12434d8d9a65d0291.debug |
9 | usr/lib/debug/.build-id/23/9b6539dccd1b676d4115aae864ea8639c66b1b.debug | 10 | usr/lib/debug/.build-id/23/9b6539dccd1b676d4115aae864ea8639c66b1b.debug |
10 | usr/lib/debug/.build-id/2a/2bf3b959b262ab4b15901f517fbe32b7dfbf7e.debug | 11 | usr/lib/debug/.build-id/2a/2bf3b959b262ab4b15901f517fbe32b7dfbf7e.debug |
11 | usr/lib/debug/.build-id/2f/7b18de42d2e1de83dcf1c215621861772355bd.debug | 12 | usr/lib/debug/.build-id/2f/7b18de42d2e1de83dcf1c215621861772355bd.debug |
Offset 15, 15 lines modified | Offset 16, 14 lines modified | ||
15 | usr/lib/debug/.build-id/41/7ffaac827bf3e0e2df5b6c4a26e2d1c194188e.debug | 16 | usr/lib/debug/.build-id/41/7ffaac827bf3e0e2df5b6c4a26e2d1c194188e.debug |
16 | usr/lib/debug/.build-id/5d/e29d299e1cb3f7bd3a950cee8573bdf1987e31.debug | 17 | usr/lib/debug/.build-id/5d/e29d299e1cb3f7bd3a950cee8573bdf1987e31.debug |
17 | usr/lib/debug/.build-id/65/01394d3a060729eac7ba52eff5f7107836379c.debug | 18 | usr/lib/debug/.build-id/65/01394d3a060729eac7ba52eff5f7107836379c.debug |
18 | usr/lib/debug/.build-id/68/6a632dd210a197dc0b70970b9a70ae0330df77.debug | 19 | usr/lib/debug/.build-id/68/6a632dd210a197dc0b70970b9a70ae0330df77.debug |
19 | usr/lib/debug/.build-id/7d/672dc823556dc7db7891c293d481f419281222.debug | 20 | usr/lib/debug/.build-id/7d/672dc823556dc7db7891c293d481f419281222.debug |
20 | usr/lib/debug/.build-id/7d/fa3c01d77be2e618066b2937fbd63114e359dc.debug | 21 | usr/lib/debug/.build-id/7d/fa3c01d77be2e618066b2937fbd63114e359dc.debug |
21 | usr/lib/debug/.build-id/86/9044679772642d8b84cd075e2fd2ddf9e8ff35.debug | 22 | usr/lib/debug/.build-id/86/9044679772642d8b84cd075e2fd2ddf9e8ff35.debug |
22 | usr/lib/debug/.build-id/8c/6f3ce6914c102a7dbe713cbc13c07d7cf56cf2.debug | ||
23 | usr/lib/debug/.build-id/8e/70f1378e1368037f7fcb36dced9a766552392e.debug | 23 | usr/lib/debug/.build-id/8e/70f1378e1368037f7fcb36dced9a766552392e.debug |
24 | usr/lib/debug/.build-id/93/29a55b613bdd05d65c335e31b22820cb1a2784.debug | 24 | usr/lib/debug/.build-id/93/29a55b613bdd05d65c335e31b22820cb1a2784.debug |
25 | usr/lib/debug/.build-id/96/d18a0962b96e32efbfa4c6e4820d24ccd1a1c7.debug | 25 | usr/lib/debug/.build-id/96/d18a0962b96e32efbfa4c6e4820d24ccd1a1c7.debug |
26 | usr/lib/debug/.build-id/9b/583708a549fac351d48db574ba1a92347ec740.debug | 26 | usr/lib/debug/.build-id/9b/583708a549fac351d48db574ba1a92347ec740.debug |
27 | usr/lib/debug/.build-id/af/9c3068c8e6d74c464dbaecbd2210d530822d13.debug | 27 | usr/lib/debug/.build-id/af/9c3068c8e6d74c464dbaecbd2210d530822d13.debug |
28 | usr/lib/debug/.build-id/b8/6d12552068069a1c2ac5cd02b493e55b31ff42.debug | 28 | usr/lib/debug/.build-id/b8/6d12552068069a1c2ac5cd02b493e55b31ff42.debug |
29 | usr/lib/debug/.build-id/bf/108dca811f6031a56a39bb620bcadb486f2b66.debug | 29 | usr/lib/debug/.build-id/bf/108dca811f6031a56a39bb620bcadb486f2b66.debug |
Offset 6, 14 lines modified | Offset 6, 16 lines modified | ||
6 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/03/ | 6 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/03/ |
7 | -rw-r--r--···0·root·········(0)·root·········(0)····39536·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/03/072ac6285f3cdecc97c56f73195796c99eb5a1.debug | 7 | -rw-r--r--···0·root·········(0)·root·········(0)····39536·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/03/072ac6285f3cdecc97c56f73195796c99eb5a1.debug |
8 | -rw-r--r--···0·root·········(0)·root·········(0)···331016·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/03/9d81c8392105cfeada28725f4f8bb86d77108d.debug | 8 | -rw-r--r--···0·root·········(0)·root·········(0)···331016·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/03/9d81c8392105cfeada28725f4f8bb86d77108d.debug |
9 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/04/ | 9 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/04/ |
10 | -rw-r--r--···0·root·········(0)·root·········(0)····76896·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/04/82d4bc54b0c73c79c5965e6a097680df95e1e9.debug | 10 | -rw-r--r--···0·root·········(0)·root·········(0)····76896·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/04/82d4bc54b0c73c79c5965e6a097680df95e1e9.debug |
11 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/13/ | 11 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/13/ |
12 | -rw-r--r--···0·root·········(0)·root·········(0)··2075376·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/13/da8c23e747598e5b49c7a81abd8ad4ad82ba8c.debug | 12 | -rw-r--r--···0·root·········(0)·root·········(0)··2075376·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/13/da8c23e747598e5b49c7a81abd8ad4ad82ba8c.debug |
13 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/14/ | ||
14 | -rw-r--r--···0·root·········(0)·root·········(0)···721776·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/14/a30e770cabf67c4565ececb7ee6fa6fe86df11.debug | ||
13 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/15/ | 15 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/15/ |
14 | -rw-r--r--···0·root·········(0)·root·········(0)···491376·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/15/68497f0e7b37e4f0d51e623be28ace97af6e02.debug | 16 | -rw-r--r--···0·root·········(0)·root·········(0)···491376·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/15/68497f0e7b37e4f0d51e623be28ace97af6e02.debug |
15 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/21/ | 17 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/21/ |
16 | -rw-r--r--···0·root·········(0)·root·········(0)···792280·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/21/95dfbc44b5d37b6d346d720095437da204af6d.debug | 18 | -rw-r--r--···0·root·········(0)·root·········(0)···792280·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/21/95dfbc44b5d37b6d346d720095437da204af6d.debug |
17 | -rw-r--r--···0·root·········(0)·root·········(0)··2190544·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/21/9e8350ad3213ddf26672a7e323f58757a06cfc.debug | 19 | -rw-r--r--···0·root·········(0)·root·········(0)··2190544·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/21/9e8350ad3213ddf26672a7e323f58757a06cfc.debug |
18 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/23/ | 20 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/23/ |
19 | -rw-r--r--···0·root·········(0)·root·········(0)··1060896·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/23/87bddb58dac9492927b7d12434d8d9a65d0291.debug | 21 | -rw-r--r--···0·root·········(0)·root·········(0)··1060896·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/23/87bddb58dac9492927b7d12434d8d9a65d0291.debug |
Offset 36, 16 lines modified | Offset 38, 14 lines modified | ||
36 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/68/ | 38 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/68/ |
37 | -rw-r--r--···0·root·········(0)·root·········(0)··2393304·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/68/6a632dd210a197dc0b70970b9a70ae0330df77.debug | 39 | -rw-r--r--···0·root·········(0)·root·········(0)··2393304·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/68/6a632dd210a197dc0b70970b9a70ae0330df77.debug |
38 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/7d/ | 40 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/7d/ |
39 | -rw-r--r--···0·root·········(0)·root·········(0)···805568·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/7d/672dc823556dc7db7891c293d481f419281222.debug | 41 | -rw-r--r--···0·root·········(0)·root·········(0)···805568·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/7d/672dc823556dc7db7891c293d481f419281222.debug |
40 | -rw-r--r--···0·root·········(0)·root·········(0)····37120·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/7d/fa3c01d77be2e618066b2937fbd63114e359dc.debug | 42 | -rw-r--r--···0·root·········(0)·root·········(0)····37120·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/7d/fa3c01d77be2e618066b2937fbd63114e359dc.debug |
41 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/86/ | 43 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/86/ |
42 | -rw-r--r--···0·root·········(0)·root·········(0)···299144·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/86/9044679772642d8b84cd075e2fd2ddf9e8ff35.debug | 44 | -rw-r--r--···0·root·········(0)·root·········(0)···299144·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/86/9044679772642d8b84cd075e2fd2ddf9e8ff35.debug |
43 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/8c/ | ||
44 | -rw-r--r--···0·root·········(0)·root·········(0)···721768·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/8c/6f3ce6914c102a7dbe713cbc13c07d7cf56cf2.debug | ||
45 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/8e/ | 45 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/8e/ |
46 | -rw-r--r--···0·root·········(0)·root·········(0)···454992·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/8e/70f1378e1368037f7fcb36dced9a766552392e.debug | 46 | -rw-r--r--···0·root·········(0)·root·········(0)···454992·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/8e/70f1378e1368037f7fcb36dced9a766552392e.debug |
47 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/93/ | 47 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/93/ |
48 | -rw-r--r--···0·root·········(0)·root·········(0)··4064696·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/93/29a55b613bdd05d65c335e31b22820cb1a2784.debug | 48 | -rw-r--r--···0·root·········(0)·root·········(0)··4064696·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/93/29a55b613bdd05d65c335e31b22820cb1a2784.debug |
49 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/96/ | 49 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/96/ |
50 | -rw-r--r--···0·root·········(0)·root·········(0)··3580264·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/96/d18a0962b96e32efbfa4c6e4820d24ccd1a1c7.debug | 50 | -rw-r--r--···0·root·········(0)·root·········(0)··3580264·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/96/d18a0962b96e32efbfa4c6e4820d24ccd1a1c7.debug |
51 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/9b/ | 51 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-03-29·13:01:52.000000·./usr/lib/debug/.build-id/9b/ |
Offset 6, 15 lines modified | Offset 6, 15 lines modified | ||
6 | ··OS/ABI:····························UNIX·-·System·V | 6 | ··OS/ABI:····························UNIX·-·System·V |
7 | ··ABI·Version:·······················0 | 7 | ··ABI·Version:·······················0 |
8 | ··Type:······························DYN·(Shared·object·file) | 8 | ··Type:······························DYN·(Shared·object·file) |
9 | ··Machine:···························Advanced·Micro·Devices·X86-64 | 9 | ··Machine:···························Advanced·Micro·Devices·X86-64 |
10 | ··Version:···························0x1 | 10 | ··Version:···························0x1 |
11 | ··Entry·point·address:···············0x0 | 11 | ··Entry·point·address:···············0x0 |
12 | ··Start·of·program·headers:··········64·(bytes·into·file) | 12 | ··Start·of·program·headers:··········64·(bytes·into·file) |
13 | ··Start·of·section·headers:··········71940 | 13 | ··Start·of·section·headers:··········719408·(bytes·into·file) |
14 | ··Flags:·····························0x0 | 14 | ··Flags:·····························0x0 |
15 | ··Size·of·this·header:···············64·(bytes) | 15 | ··Size·of·this·header:···············64·(bytes) |
16 | ··Size·of·program·headers:···········56·(bytes) | 16 | ··Size·of·program·headers:···········56·(bytes) |
17 | ··Number·of·program·headers:·········9 | 17 | ··Number·of·program·headers:·········9 |
18 | ··Size·of·section·headers:···········64·(bytes) | 18 | ··Size·of·section·headers:···········64·(bytes) |
19 | ··Number·of·section·headers:·········37 | 19 | ··Number·of·section·headers:·········37 |
20 | ··Section·header·string·table·index:·36 | 20 | ··Section·header·string·table·index:·36 |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | There·are·37·section·headers,·starting·at·offset·0xafa | 1 | There·are·37·section·headers,·starting·at·offset·0xafa30: |
2 | Section·Headers: | 2 | Section·Headers: |
3 | ··[Nr]·Name··············Type············Address··········Off····Size···ES·Flg·Lk·Inf·Al | 3 | ··[Nr]·Name··············Type············Address··········Off····Size···ES·Flg·Lk·Inf·Al |
4 | ··[·0]···················NULL············0000000000000000·000000·000000·00······0···0··0 | 4 | ··[·0]···················NULL············0000000000000000·000000·000000·00······0···0··0 |
5 | ··[·1]·.note.gnu.build-id·NOTE············0000000000000238·000238·000024·00···A··0···0··4 | 5 | ··[·1]·.note.gnu.build-id·NOTE············0000000000000238·000238·000024·00···A··0···0··4 |
6 | ··[·2]·.gnu.hash·········NOBITS··········0000000000000260·00025c·000028·00···A··3···0··8 | 6 | ··[·2]·.gnu.hash·········NOBITS··········0000000000000260·00025c·000028·00···A··3···0··8 |
7 | ··[·3]·.dynsym···········NOBITS··········0000000000000288·00025c·001398·18···A··4···1··8 | 7 | ··[·3]·.dynsym···········NOBITS··········0000000000000288·00025c·001398·18···A··4···1··8 |
Offset 24, 23 lines modified | Offset 24, 23 lines modified | ||
24 | ··[19]·.data.rel.ro······NOBITS··········000000000005dca8·000c98·000ae8·00··WA··0···0··8 | 24 | ··[19]·.data.rel.ro······NOBITS··········000000000005dca8·000c98·000ae8·00··WA··0···0··8 |
25 | ··[20]·.dynamic··········NOBITS··········000000000005e790·000c98·0001e0·10··WA··4···0··8 | 25 | ··[20]·.dynamic··········NOBITS··········000000000005e790·000c98·0001e0·10··WA··4···0··8 |
26 | ··[21]·.got··············NOBITS··········000000000005e970·000c98·000690·08··WA··0···0··8 | 26 | ··[21]·.got··············NOBITS··········000000000005e970·000c98·000690·08··WA··0···0··8 |
27 | ··[22]·.data·············NOBITS··········000000000005f000·000c98·001688·00··WA··0···0·32 | 27 | ··[22]·.data·············NOBITS··········000000000005f000·000c98·001688·00··WA··0···0·32 |
28 | ··[23]·.bss··············NOBITS··········00000000000606a0·000c98·0011c8·00··WA··0···0·32 | 28 | ··[23]·.bss··············NOBITS··········00000000000606a0·000c98·0011c8·00··WA··0···0·32 |
29 | ··[24]·.comment··········PROGBITS········0000000000000000·00025c·00001f·01··MS··0···0··1 | 29 | ··[24]·.comment··········PROGBITS········0000000000000000·00025c·00001f·01··MS··0···0··1 |
30 | ··[25]·.debug_aranges····PROGBITS········0000000000000000·000280·00003c·00···C··0···0··8 | 30 | ··[25]·.debug_aranges····PROGBITS········0000000000000000·000280·00003c·00···C··0···0··8 |
31 | ··[26]·.debug_info·······PROGBITS········0000000000000000·0002c0·040c | 31 | ··[26]·.debug_info·······PROGBITS········0000000000000000·0002c0·040c80·00···C··0···0··8 |
32 | ··[27]·.debug_abbrev·····PROGBITS········0000000000000000·040f | 32 | ··[27]·.debug_abbrev·····PROGBITS········0000000000000000·040f40·00054b·00···C··0···0··8 |
33 | ··[28]·.debug_line·······PROGBITS········0000000000000000·0414 | 33 | ··[28]·.debug_line·······PROGBITS········0000000000000000·041490·01de1a·00···C··0···0··8 |
34 | ··[29]·.debug_str········PROGBITS········0000000000000000·05f2 | 34 | ··[29]·.debug_str········PROGBITS········0000000000000000·05f2b0·000686·01·MSC··0···0··8 |
35 | ··[30]·.debug_line_str···PROGBITS········0000000000000000·05f93 | 35 | ··[30]·.debug_line_str···PROGBITS········0000000000000000·05f938·0001d4·01·MSC··0···0··8 |
36 | ··[31]·.debug_loclists···PROGBITS········0000000000000000·05fb | 36 | ··[31]·.debug_loclists···PROGBITS········0000000000000000·05fb10·03a008·00···C··0···0··8 |
37 | ··[32]·.debug_rnglists···PROGBITS········0000000000000000·099b1 | 37 | ··[32]·.debug_rnglists···PROGBITS········0000000000000000·099b18·008cb0·00···C··0···0··8 |
38 | ··[33]·.gnu_debugaltlink·PROGBITS········0000000000000000·0a27c | 38 | ··[33]·.gnu_debugaltlink·PROGBITS········0000000000000000·0a27c8·000052·00······0···0··1 |
39 | ··[34]·.symtab···········SYMTAB··········0000000000000000·0a28 | 39 | ··[34]·.symtab···········SYMTAB··········0000000000000000·0a2820·006360·18·····35·852··8 |
40 | ··[35]·.strtab···········STRTAB··········0000000000000000·0a8b | 40 | ··[35]·.strtab···········STRTAB··········0000000000000000·0a8b80·006d32·00······0···0··1 |
41 | ··[36]·.shstrtab·········STRTAB··········0000000000000000·0af8 | 41 | ··[36]·.shstrtab·········STRTAB··········0000000000000000·0af8b2·000177·00······0···0··1 |
42 | Key·to·Flags: | 42 | Key·to·Flags: |
43 | ··W·(write),·A·(alloc),·X·(execute),·M·(merge),·S·(strings),·I·(info), | 43 | ··W·(write),·A·(alloc),·X·(execute),·M·(merge),·S·(strings),·I·(info), |
44 | ··L·(link·order),·O·(extra·OS·processing·required),·G·(group),·T·(TLS), | 44 | ··L·(link·order),·O·(extra·OS·processing·required),·G·(group),·T·(TLS), |
45 | ··C·(compressed),·x·(unknown),·o·(OS·specific),·E·(exclude), | 45 | ··C·(compressed),·x·(unknown),·o·(OS·specific),·E·(exclude), |
46 | ··D·(mbind),·l·(large),·p·(processor·specific) | 46 | ··D·(mbind),·l·(large),·p·(processor·specific) |
Offset 1, 4 lines modified | Offset 1, 4 lines modified | ||
1 | Displaying·notes·found·in:·.note.gnu.build-id | 1 | Displaying·notes·found·in:·.note.gnu.build-id |
2 | ··Owner················Data·size·» Description | 2 | ··Owner················Data·size·» Description |
3 | ··GNU··················0x00000014» NT_GNU_BUILD_ID·(unique·build·ID·bitstring)» ····Build·ID:· | 3 | ··GNU··················0x00000014» NT_GNU_BUILD_ID·(unique·build·ID·bitstring)» ····Build·ID:·14a30e770cabf67c4565ececb7ee6fa6fe86df11 |
Offset 1, 11 lines modified | Offset 1, 11 lines modified | ||
1 | Contents·of·the·.debug_info·section: | 1 | Contents·of·the·.debug_info·section: |
2 | ··Compilation·Unit·@·offset·0: | 2 | ··Compilation·Unit·@·offset·0: |
3 | ···Length:········0x8612 | 3 | ···Length:········0x86127·(32-bit) |
4 | ···Version:·······5 | 4 | ···Version:·······5 |
5 | ···Unit·Type:·····DW_UT_compile·(1) | 5 | ···Unit·Type:·····DW_UT_compile·(1) |
6 | ···Abbrev·Offset:·0 | 6 | ···Abbrev·Offset:·0 |
7 | ···Pointer·Size:··8 | 7 | ···Pointer·Size:··8 |
8 | ·<0><c>:·Abbrev·Number:·175·(DW_TAG_compile_unit) | 8 | ·<0><c>:·Abbrev·Number:·175·(DW_TAG_compile_unit) |
9 | ····<e>···DW_AT_producer····:·(GNU_strp_alt)·(offset:·0x1824c)· | 9 | ····<e>···DW_AT_producer····:·(GNU_strp_alt)·(offset:·0x1824c)· |
10 | ····<12>···DW_AT_language····:·(data1)·29» (C11) | 10 | ····<12>···DW_AT_language····:·(data1)·29» (C11) |
Offset 876, 15 lines modified | Offset 876, 15 lines modified | ||
876 | ·<1><98d>:·Abbrev·Number:·103·(DW_TAG_array_type) | 876 | ·<1><98d>:·Abbrev·Number:·103·(DW_TAG_array_type) |
877 | ····<98e>···DW_AT_type········:·(GNU_ref_alt)·<0x91> | 877 | ····<98e>···DW_AT_type········:·(GNU_ref_alt)·<0x91> |
878 | ····<992>···DW_AT_sibling·····:·(ref_udata)·<0x998> | 878 | ····<992>···DW_AT_sibling·····:·(ref_udata)·<0x998> |
879 | ·<2><994>:·Abbrev·Number:·107·(DW_TAG_subrange_type) | 879 | ·<2><994>:·Abbrev·Number:·107·(DW_TAG_subrange_type) |
880 | ····<995>···DW_AT_type········:·(ref_udata)·<0x2b> | 880 | ····<995>···DW_AT_type········:·(ref_udata)·<0x2b> |
881 | ····<996>···DW_AT_upper_bound·:·(data1)·13 | 881 | ····<996>···DW_AT_upper_bound·:·(data1)·13 |
882 | ·<2><997>:·Abbrev·Number:·0 | 882 | ·<2><997>:·Abbrev·Number:·0 |
883 | ·<1><998>:·Abbrev·Number:·3 | 883 | ·<1><998>:·Abbrev·Number:·39·(DW_TAG_variable) |
884 | ····<999>···DW_AT_name········:·(GNU_strp_alt)·(offset:·0xfdfa)· | 884 | ····<999>···DW_AT_name········:·(GNU_strp_alt)·(offset:·0xfdfa)· |
885 | ····<99d>···DW_AT_decl_file···:·(data1)·1 | 885 | ····<99d>···DW_AT_decl_file···:·(data1)·1 |
886 | ····<99e>···DW_AT_decl_line···:·(data2)·1592 | 886 | ····<99e>···DW_AT_decl_line···:·(data2)·1592 |
887 | ····<9a0>···DW_AT_decl_column·:·(data1)·20 | 887 | ····<9a0>···DW_AT_decl_column·:·(data1)·20 |
888 | ····<9a1>···DW_AT_type········:·(ref_udata)·<0x98d> | 888 | ····<9a1>···DW_AT_type········:·(ref_udata)·<0x98d> |
889 | ·<1><9a3>:·Abbrev·Number:·106·(DW_TAG_structure_type) | 889 | ·<1><9a3>:·Abbrev·Number:·106·(DW_TAG_structure_type) |
890 | ····<9a4>···DW_AT_byte_size···:·(data1)·104 | 890 | ····<9a4>···DW_AT_byte_size···:·(data1)·104 |
Offset 2562, 15 lines modified | Offset 2562, 15 lines modified | ||
2562 | ·<2><159f>:·Abbrev·Number:·0 | 2562 | ·<2><159f>:·Abbrev·Number:·0 |
2563 | ·<1><15a0>:·Abbrev·Number:·50·(DW_TAG_pointer_type) | 2563 | ·<1><15a0>:·Abbrev·Number:·50·(DW_TAG_pointer_type) |
2564 | ····<15a1>···DW_AT_byte_size···:·(implicit_const)·8 | 2564 | ····<15a1>···DW_AT_byte_size···:·(implicit_const)·8 |
2565 | ····<15a1>···DW_AT_type········:·(ref_udata)·<0xcdd> | 2565 | ····<15a1>···DW_AT_type········:·(ref_udata)·<0xcdd> |
2566 | ·<1><15a3>:·Abbrev·Number:·50·(DW_TAG_pointer_type) | 2566 | ·<1><15a3>:·Abbrev·Number:·50·(DW_TAG_pointer_type) |
2567 | ····<15a4>···DW_AT_byte_size···:·(implicit_const)·8 | 2567 | ····<15a4>···DW_AT_byte_size···:·(implicit_const)·8 |
2568 | ····<15a4>···DW_AT_type········:·(ref_udata)·<0x158f> | 2568 | ····<15a4>···DW_AT_type········:·(ref_udata)·<0x158f> |
2569 | ·<1><15a6>:·Abbrev·Number:·3 | 2569 | ·<1><15a6>:·Abbrev·Number:·39·(DW_TAG_variable) |
2570 | ····<15a7>···DW_AT_name········:·(GNU_strp_alt)·(offset:·0x14bca)· | 2570 | ····<15a7>···DW_AT_name········:·(GNU_strp_alt)·(offset:·0x14bca)· |
2571 | ····<15ab>···DW_AT_decl_file···:·(data1)·1 | 2571 | ····<15ab>···DW_AT_decl_file···:·(data1)·1 |
2572 | ····<15ac>···DW_AT_decl_line···:·(data2)·2694 | 2572 | ····<15ac>···DW_AT_decl_line···:·(data2)·2694 |
2573 | ····<15ae>···DW_AT_decl_column·:·(data1)·80 | 2573 | ····<15ae>···DW_AT_decl_column·:·(data1)·80 |
2574 | ····<15af>···DW_AT_type········:·(ref_udata)·<0x106c> | 2574 | ····<15af>···DW_AT_type········:·(ref_udata)·<0x106c> |
2575 | ·<1><15b1>:·Abbrev·Number:·114·(DW_TAG_subroutine_type) | 2575 | ·<1><15b1>:·Abbrev·Number:·114·(DW_TAG_subroutine_type) |
2576 | ····<15b2>···DW_AT_prototyped··:·(flag_present)·1 | 2576 | ····<15b2>···DW_AT_prototyped··:·(flag_present)·1 |
Offset 2588, 15 lines modified | Offset 2588, 15 lines modified | ||
2588 | ····<15c3>···DW_AT_type········:·(ref_udata)·<0x106f> | 2588 | ····<15c3>···DW_AT_type········:·(ref_udata)·<0x106f> |
2589 | ·<1><15c5>:·Abbrev·Number:·50·(DW_TAG_pointer_type) | 2589 | ·<1><15c5>:·Abbrev·Number:·50·(DW_TAG_pointer_type) |
2590 | ····<15c6>···DW_AT_byte_size···:·(implicit_const)·8 | 2590 | ····<15c6>···DW_AT_byte_size···:·(implicit_const)·8 |
2591 | ····<15c6>···DW_AT_type········:·(ref_udata)·<0xd06> | 2591 | ····<15c6>···DW_AT_type········:·(ref_udata)·<0xd06> |
2592 | ·<1><15c8>:·Abbrev·Number:·50·(DW_TAG_pointer_type) | 2592 | ·<1><15c8>:·Abbrev·Number:·50·(DW_TAG_pointer_type) |
2593 | ····<15c9>···DW_AT_byte_size···:·(implicit_const)·8 | 2593 | ····<15c9>···DW_AT_byte_size···:·(implicit_const)·8 |
2594 | ····<15c9>···DW_AT_type········:·(ref_udata)·<0x15b1> | 2594 | ····<15c9>···DW_AT_type········:·(ref_udata)·<0x15b1> |
2595 | ·<1><15cb>:·Abbrev·Number:·3 | 2595 | ·<1><15cb>:·Abbrev·Number:·39·(DW_TAG_variable) |
2596 | ····<15cc>···DW_AT_name········:·(GNU_strp_alt)·(offset:·0x1b86a)· | 2596 | ····<15cc>···DW_AT_name········:·(GNU_strp_alt)·(offset:·0x1b86a)· |
2597 | ····<15d0>···DW_AT_decl_file···:·(data1)·1 | 2597 | ····<15d0>···DW_AT_decl_file···:·(data1)·1 |
2598 | ····<15d1>···DW_AT_decl_line···:·(data2)·2708 | 2598 | ····<15d1>···DW_AT_decl_line···:·(data2)·2708 |
2599 | ····<15d3>···DW_AT_decl_column·:·(data1)·79 | 2599 | ····<15d3>···DW_AT_decl_column·:·(data1)·79 |
2600 | ····<15d4>···DW_AT_type········:·(ref_udata)·<0x10f3> | 2600 | ····<15d4>···DW_AT_type········:·(ref_udata)·<0x10f3> |
2601 | ·<1><15d6>:·Abbrev·Number:·86·(DW_TAG_subroutine_type) | 2601 | ·<1><15d6>:·Abbrev·Number:·86·(DW_TAG_subroutine_type) |
2602 | ····<15d7>···DW_AT_prototyped··:·(flag_present)·1 | 2602 | ····<15d7>···DW_AT_prototyped··:·(flag_present)·1 |
Offset 2609, 15 lines modified | Offset 2609, 15 lines modified | ||
2609 | ·<2><15e5>:·Abbrev·Number:·0 | 2609 | ·<2><15e5>:·Abbrev·Number:·0 |
2610 | ·<1><15e6>:·Abbrev·Number:·50·(DW_TAG_pointer_type) | 2610 | ·<1><15e6>:·Abbrev·Number:·50·(DW_TAG_pointer_type) |
2611 | ····<15e7>···DW_AT_byte_size···:·(implicit_const)·8 | 2611 | ····<15e7>···DW_AT_byte_size···:·(implicit_const)·8 |
2612 | ····<15e7>···DW_AT_type········:·(ref_udata)·<0x10f6> | 2612 | ····<15e7>···DW_AT_type········:·(ref_udata)·<0x10f6> |
2613 | ·<1><15e9>:·Abbrev·Number:·50·(DW_TAG_pointer_type) | 2613 | ·<1><15e9>:·Abbrev·Number:·50·(DW_TAG_pointer_type) |
2614 | ····<15ea>···DW_AT_byte_size···:·(implicit_const)·8 | 2614 | ····<15ea>···DW_AT_byte_size···:·(implicit_const)·8 |
2615 | ····<15ea>···DW_AT_type········:·(ref_udata)·<0x15d6> | 2615 | ····<15ea>···DW_AT_type········:·(ref_udata)·<0x15d6> |
2616 | ·<1><15ec>:·Abbrev·Number:·3 | 2616 | ·<1><15ec>:·Abbrev·Number:·39·(DW_TAG_variable) |
2617 | ····<15ed>···DW_AT_name········:·(GNU_strp_alt)·(offset:·0xeb8d)· | 2617 | ····<15ed>···DW_AT_name········:·(GNU_strp_alt)·(offset:·0xeb8d)· |
2618 | ····<15f1>···DW_AT_decl_file···:·(data1)·1 | 2618 | ····<15f1>···DW_AT_decl_file···:·(data1)·1 |
2619 | ····<15f2>···DW_AT_decl_line···:·(data2)·2723 | 2619 | ····<15f2>···DW_AT_decl_line···:·(data2)·2723 |
2620 | ····<15f4>···DW_AT_decl_column·:·(data1)·80 | 2620 | ····<15f4>···DW_AT_decl_column·:·(data1)·80 |
2621 | ····<15f5>···DW_AT_type········:·(ref_udata)·<0x115a> | 2621 | ····<15f5>···DW_AT_type········:·(ref_udata)·<0x115a> |
2622 | ·<1><15f7>:·Abbrev·Number:·114·(DW_TAG_subroutine_type) | 2622 | ·<1><15f7>:·Abbrev·Number:·114·(DW_TAG_subroutine_type) |
2623 | ····<15f8>···DW_AT_prototyped··:·(flag_present)·1 | 2623 | ····<15f8>···DW_AT_prototyped··:·(flag_present)·1 |
Offset 2637, 15 lines modified | Offset 2637, 15 lines modified | ||
2637 | ····<160c>···DW_AT_type········:·(ref_udata)·<0x1184> | 2637 | ····<160c>···DW_AT_type········:·(ref_udata)·<0x1184> |
2638 | ·<1><160e>:·Abbrev·Number:·50·(DW_TAG_pointer_type) | 2638 | ·<1><160e>:·Abbrev·Number:·50·(DW_TAG_pointer_type) |
2639 | ····<160f>···DW_AT_byte_size···:·(implicit_const)·8 | 2639 | ····<160f>···DW_AT_byte_size···:·(implicit_const)·8 |
2640 | ····<160f>···DW_AT_type········:·(ref_udata)·<0xeba> | 2640 | ····<160f>···DW_AT_type········:·(ref_udata)·<0xeba> |
2641 | ·<1><1611>:·Abbrev·Number:·50·(DW_TAG_pointer_type) | 2641 | ·<1><1611>:·Abbrev·Number:·50·(DW_TAG_pointer_type) |
2642 | ····<1612>···DW_AT_byte_size···:·(implicit_const)·8 | 2642 | ····<1612>···DW_AT_byte_size···:·(implicit_const)·8 |
2643 | ····<1612>···DW_AT_type········:·(ref_udata)·<0x15f7> | 2643 | ····<1612>···DW_AT_type········:·(ref_udata)·<0x15f7> |
2644 | ·<1><1614>:·Abbrev·Number:·3 | 2644 | ·<1><1614>:·Abbrev·Number:·39·(DW_TAG_variable) |
2645 | ····<1615>···DW_AT_name········:·(GNU_strp_alt)·(offset:·0x16097)· | 2645 | ····<1615>···DW_AT_name········:·(GNU_strp_alt)·(offset:·0x16097)· |
2646 | ····<1619>···DW_AT_decl_file···:·(data1)·1 | 2646 | ····<1619>···DW_AT_decl_file···:·(data1)·1 |
2647 | ····<161a>···DW_AT_decl_line···:·(data2)·2737 | 2647 | ····<161a>···DW_AT_decl_line···:·(data2)·2737 |
2648 | ····<161c>···DW_AT_decl_column·:·(data1)·81 | 2648 | ····<161c>···DW_AT_decl_column·:·(data1)·81 |
2649 | ····<161d>···DW_AT_type········:·(ref_udata)·<0x1267> | 2649 | ····<161d>···DW_AT_type········:·(ref_udata)·<0x1267> |
2650 | ·<1><161f>:·Abbrev·Number:·86·(DW_TAG_subroutine_type) | 2650 | ·<1><161f>:·Abbrev·Number:·86·(DW_TAG_subroutine_type) |
2651 | ····<1620>···DW_AT_prototyped··:·(flag_present)·1 | 2651 | ····<1620>···DW_AT_prototyped··:·(flag_present)·1 |
Offset 6149, 15 lines modified | Offset 6149, 15 lines modified | ||
6149 | ·<1><3e3c>:·Abbrev·Number:·52·(DW_TAG_variable) | 6149 | ·<1><3e3c>:·Abbrev·Number:·52·(DW_TAG_variable) |
6150 | ····<3e3d>···DW_AT_name········:·(strp)·(offset:·0x826):·__pyx_k_unconverted_data_remains_when_pa | 6150 | ····<3e3d>···DW_AT_name········:·(strp)·(offset:·0x826):·__pyx_k_unconverted_data_remains_when_pa |
6151 | ····<3e41>···DW_AT_decl_file···:·(data1)·1 | 6151 | ····<3e41>···DW_AT_decl_file···:·(data1)·1 |
6152 | ····<3e42>···DW_AT_decl_line···:·(data2)·4699 | 6152 | ····<3e42>···DW_AT_decl_line···:·(data2)·4699 |
6153 | ····<3e44>···DW_AT_decl_column·:·(data1)·19 | 6153 | ····<3e44>···DW_AT_decl_column·:·(data1)·19 |
6154 | ····<3e45>···DW_AT_type········:·(GNU_ref_alt)·<0xb1ca> | 6154 | ····<3e45>···DW_AT_type········:·(GNU_ref_alt)·<0xb1ca> |
6155 | ····<3e49>···DW_AT_location····:·(exprloc)·9·byte·block:·3·c0·2c·5·0·0·0·0·0·» (DW_OP_addr:·52cc0) | 6155 | ····<3e49>···DW_AT_location····:·(exprloc)·9·byte·block:·3·c0·2c·5·0·0·0·0·0·» (DW_OP_addr:·52cc0) |
6156 | ·<1><3e53>:·Abbrev·Number:·3 | 6156 | ·<1><3e53>:·Abbrev·Number:·39·(DW_TAG_variable) |
6157 | ····<3e54>···DW_AT_name········:·(GNU_strp_alt)·(offset:·0x1c82d)· | 6157 | ····<3e54>···DW_AT_name········:·(GNU_strp_alt)·(offset:·0x1c82d)· |
6158 | ····<3e58>···DW_AT_decl_file···:·(data1)·1 | 6158 | ····<3e58>···DW_AT_decl_file···:·(data1)·1 |
6159 | ····<3e59>···DW_AT_decl_line···:·(data2)·4756 | 6159 | ····<3e59>···DW_AT_decl_line···:·(data2)·4756 |
6160 | ····<3e5b>···DW_AT_decl_column·:·(data1)·30 | 6160 | ····<3e5b>···DW_AT_decl_column·:·(data1)·30 |
6161 | ····<3e5c>···DW_AT_type········:·(ref_udata)·<0x17f1> | 6161 | ····<3e5c>···DW_AT_type········:·(ref_udata)·<0x17f1> |
6162 | ·<1><3e5e>:·Abbrev·Number:·177·(DW_TAG_structure_type) | 6162 | ·<1><3e5e>:·Abbrev·Number:·177·(DW_TAG_structure_type) |
6163 | ····<3e60>···DW_AT_byte_size···:·(data2)·3648 | 6163 | ····<3e60>···DW_AT_byte_size···:·(data2)·3648 |
Offset 9367, 15 lines modified | Offset 9367, 15 lines modified | ||
9367 | ·<1><5765>:·Abbrev·Number:·74·(DW_TAG_variable) | 9367 | ·<1><5765>:·Abbrev·Number:·74·(DW_TAG_variable) |
9368 | ····<5766>···DW_AT_name········:·(GNU_strp_alt)·(offset:·0x82e5)· | 9368 | ····<5766>···DW_AT_name········:·(GNU_strp_alt)·(offset:·0x82e5)· |
9369 | ····<576a>···DW_AT_decl_file···:·(data1)·1 | 9369 | ····<576a>···DW_AT_decl_file···:·(data1)·1 |
9370 | ····<576b>···DW_AT_decl_line···:·(data2)·5311 | 9370 | ····<576b>···DW_AT_decl_line···:·(data2)·5311 |
9371 | ····<576d>···DW_AT_decl_column·:·(data1)·21 | 9371 | ····<576d>···DW_AT_decl_column·:·(data1)·21 |
9372 | ····<576e>···DW_AT_type········:·(ref_udata)·<0x575a> | 9372 | ····<576e>···DW_AT_type········:·(ref_udata)·<0x575a> |
9373 | ····<5771>···DW_AT_location····:·(exprloc)·9·byte·block:·3·e0·7·6·0·0·0·0·0·» (DW_OP_addr:·607e0) | 9373 | ····<5771>···DW_AT_location····:·(exprloc)·9·byte·block:·3·e0·7·6·0·0·0·0·0·» (DW_OP_addr:·607e0) |
9374 | ·<1><577b>:·Abbrev·Number:·3 | 9374 | ·<1><577b>:·Abbrev·Number:·39·(DW_TAG_variable) |
9375 | ····<577c>···DW_AT_name········:·(GNU_strp_alt)·(offset:·0x11cf2)· | 9375 | ····<577c>···DW_AT_name········:·(GNU_strp_alt)·(offset:·0x11cf2)· |
9376 | ····<5780>···DW_AT_decl_file···:·(data1)·1 | 9376 | ····<5780>···DW_AT_decl_file···:·(data1)·1 |
9377 | ····<5781>···DW_AT_decl_line···:·(data2)·5317 | 9377 | ····<5781>···DW_AT_decl_line···:·(data2)·5317 |
9378 | ····<5783>···DW_AT_decl_column·:·(data1)·22 | 9378 | ····<5783>···DW_AT_decl_column·:·(data1)·22 |
9379 | ····<5784>···DW_AT_type········:·(ref_udata)·<0x5787> | 9379 | ····<5784>···DW_AT_type········:·(ref_udata)·<0x5787> |
9380 | ·<1><5787>:·Abbrev·Number:·50·(DW_TAG_pointer_type) | 9380 | ·<1><5787>:·Abbrev·Number:·50·(DW_TAG_pointer_type) |
9381 | ····<5788>···DW_AT_byte_size···:·(implicit_const)·8 | 9381 | ····<5788>···DW_AT_byte_size···:·(implicit_const)·8 |
Offset 9846, 15 lines modified | Offset 9846, 15 lines modified | ||
9846 | ····<5c81>···DW_AT_type········:·(GNU_ref_alt)·<0xedb0> | 9846 | ····<5c81>···DW_AT_type········:·(GNU_ref_alt)·<0xedb0> |
9847 | ·<2><5c85>:·Abbrev·Number:·20·(DW_TAG_formal_parameter) | 9847 | ·<2><5c85>:·Abbrev·Number:·20·(DW_TAG_formal_parameter) |
9848 | ····<5c86>···DW_AT_name········:·(GNU_strp_alt)·(offset:·0xcb1c)· | 9848 | ····<5c86>···DW_AT_name········:·(GNU_strp_alt)·(offset:·0xcb1c)· |
Max diff block lines reached; 15328325/15335032 bytes (99.96%) of diff not shown. |
Offset 228, 26 lines modified | Offset 228, 26 lines modified | ||
228 | ····DW_AT·value:·0·····DW_FORM·value:·0 | 228 | ····DW_AT·value:·0·····DW_FORM·value:·0 |
229 | ···36······DW_TAG_call_site····[no·children] | 229 | ···36······DW_TAG_call_site····[no·children] |
230 | ····DW_AT_call_return_pc·DW_FORM_addr | 230 | ····DW_AT_call_return_pc·DW_FORM_addr |
231 | ····DW_AT_call_origin··DW_FORM_ref_udata | 231 | ····DW_AT_call_origin··DW_FORM_ref_udata |
232 | ····DW_AT·value:·0·····DW_FORM·value:·0 | 232 | ····DW_AT·value:·0·····DW_FORM·value:·0 |
233 | ···37······DW_TAG_lexical_block····[has·children] | 233 | ···37······DW_TAG_lexical_block····[has·children] |
234 | ····DW_AT·value:·0·····DW_FORM·value:·0 | 234 | ····DW_AT·value:·0·····DW_FORM·value:·0 |
235 | ···38······DW_TAG_lexical_block····[has·children] | ||
236 | ····DW_AT_abstract_origin·DW_FORM_ref_udata | ||
237 | ····DW_AT_ranges·······DW_FORM_sec_offset | ||
238 | ····DW_AT_sibling······DW_FORM_ref_udata | ||
239 | ····DW_AT·value:·0·····DW_FORM·value:·0 | ||
235 | ···3 | 240 | ···39······DW_TAG_variable····[no·children] |
236 | ····DW_AT_name·········DW_FORM_GNU_strp_alt | 241 | ····DW_AT_name·········DW_FORM_GNU_strp_alt |
237 | ····DW_AT_decl_file····DW_FORM_data1 | 242 | ····DW_AT_decl_file····DW_FORM_data1 |
238 | ····DW_AT_decl_line····DW_FORM_data2 | 243 | ····DW_AT_decl_line····DW_FORM_data2 |
239 | ····DW_AT_decl_column··DW_FORM_data1 | 244 | ····DW_AT_decl_column··DW_FORM_data1 |
240 | ····DW_AT_type·········DW_FORM_ref_udata | 245 | ····DW_AT_type·········DW_FORM_ref_udata |
241 | ····DW_AT·value:·0·····DW_FORM·value:·0 | 246 | ····DW_AT·value:·0·····DW_FORM·value:·0 |
242 | ···39······DW_TAG_lexical_block····[has·children] | ||
243 | ····DW_AT_abstract_origin·DW_FORM_ref_udata | ||
244 | ····DW_AT_ranges·······DW_FORM_sec_offset | ||
245 | ····DW_AT_sibling······DW_FORM_ref_udata | ||
246 | ····DW_AT·value:·0·····DW_FORM·value:·0 | ||
247 | ···40······DW_TAG_variable····[no·children] | 247 | ···40······DW_TAG_variable····[no·children] |
248 | ····DW_AT_abstract_origin·DW_FORM_ref_udata | 248 | ····DW_AT_abstract_origin·DW_FORM_ref_udata |
249 | ····DW_AT·value:·0·····DW_FORM·value:·0 | 249 | ····DW_AT·value:·0·····DW_FORM·value:·0 |
250 | ···41······DW_TAG_member····[no·children] | 250 | ···41······DW_TAG_member····[no·children] |
251 | ····DW_AT_name·········DW_FORM_GNU_strp_alt | 251 | ····DW_AT_name·········DW_FORM_GNU_strp_alt |
252 | ····DW_AT_decl_file····DW_FORM_data1 | 252 | ····DW_AT_decl_file····DW_FORM_data1 |
253 | ····DW_AT_decl_line····DW_FORM_data2 | 253 | ····DW_AT_decl_line····DW_FORM_data2 |
Offset 62354, 21 lines modified | Offset 62354, 21 lines modified | ||
62354 | ····0003089a·v000000000000001·v000000000000000·views·at·00030898·for: | 62354 | ····0003089a·v000000000000001·v000000000000000·views·at·00030898·for: |
62355 | ·············0000000000039b33·0000000000039bf6·(DW_OP_lit1;·DW_OP_stack_value) | 62355 | ·············0000000000039b33·0000000000039bf6·(DW_OP_lit1;·DW_OP_stack_value) |
62356 | ····000308a8·<End·of·list> | 62356 | ····000308a8·<End·of·list> |
62357 | ····000308a9·v000000000000001·v000000000000000·location·view·pair | 62357 | ····000308a9·v000000000000001·v000000000000000·location·view·pair |
62358 | ····000308ab·v000000000000001·v000000000000000·views·at·000308a9·for: | 62358 | ····000308ab·v000000000000001·v000000000000000·views·at·000308a9·for: |
62359 | ·············0000000000039b33·0000000000039bf6·(DW_OP_implicit_pointer:·<0x2de | 62359 | ·············0000000000039b33·0000000000039bf6·(DW_OP_implicit_pointer:·<0x2de90>·0) |
62360 | ····000308bd·<End·of·list> | 62360 | ····000308bd·<End·of·list> |
62361 | ····000308be·v000000000000001·v000000000000000·location·view·pair | 62361 | ····000308be·v000000000000001·v000000000000000·location·view·pair |
62362 | ····000308c0·v000000000000001·v000000000000000·views·at·000308be·for: | 62362 | ····000308c0·v000000000000001·v000000000000000·views·at·000308be·for: |
62363 | ·············0000000000039b33·0000000000039bf6·(DW_OP_implicit_pointer:·<0x2deb | 62363 | ·············0000000000039b33·0000000000039bf6·(DW_OP_implicit_pointer:·<0x2deb8>·0) |
62364 | ····000308d2·<End·of·list> | 62364 | ····000308d2·<End·of·list> |
62365 | ····000308d3·v000000000000001·v000000000000000·location·view·pair | 62365 | ····000308d3·v000000000000001·v000000000000000·location·view·pair |
62366 | ····000308d5·v000000000000001·v000000000000000·views·at·000308d3·for: | 62366 | ····000308d5·v000000000000001·v000000000000000·views·at·000308d3·for: |
62367 | ·············0000000000039b40·0000000000039bf6·(DW_OP_reg12·(r12)) | 62367 | ·············0000000000039b40·0000000000039bf6·(DW_OP_reg12·(r12)) |
62368 | ····000308e2·<End·of·list> | 62368 | ····000308e2·<End·of·list> |
Offset 62450, 17 lines modified | Offset 62450, 17 lines modified | ||
62450 | ····000309be·<End·of·list> | 62450 | ····000309be·<End·of·list> |
62451 | ····000309bf·v000000000000003·v000000000000000·location·view·pair | 62451 | ····000309bf·v000000000000003·v000000000000000·location·view·pair |
62452 | ····000309c1·v000000000000000·v000000000000001·location·view·pair | 62452 | ····000309c1·v000000000000000·v000000000000001·location·view·pair |
62453 | ····000309c3·0000000000039bf6·(base·address) | 62453 | ····000309c3·0000000000039bf6·(base·address) |
62454 | ····000309cc·v000000000000003·v000000000000000·views·at·000309bf·for: | 62454 | ····000309cc·v000000000000003·v000000000000000·views·at·000309bf·for: |
62455 | ·············0000000000039bf6·0000000000039c46·(DW_OP_implicit_pointer:·<0x2ddf | 62455 | ·············0000000000039bf6·0000000000039c46·(DW_OP_implicit_pointer:·<0x2ddf3>·0) |
62456 | ····000309d6·v000000000000000·v000000000000001·views·at·000309c1·for: | 62456 | ····000309d6·v000000000000000·v000000000000001·views·at·000309c1·for: |
62457 | ·············000000000003a73c·000000000003a75f·(DW_OP_implicit_pointer:·<0x2ddf | 62457 | ·············000000000003a73c·000000000003a75f·(DW_OP_implicit_pointer:·<0x2ddf3>·0) |
62458 | ····000309e2·<End·of·list> | 62458 | ····000309e2·<End·of·list> |
62459 | ····000309e3·v000000000000000·v000000000000000·location·view·pair | 62459 | ····000309e3·v000000000000000·v000000000000000·location·view·pair |
62460 | ····000309e5·v000000000000000·v000000000000000·views·at·000309e3·for: | 62460 | ····000309e5·v000000000000000·v000000000000000·views·at·000309e3·for: |
62461 | ·············0000000000039c39·0000000000039c46·(DW_OP_reg13·(r13)) | 62461 | ·············0000000000039c39·0000000000039c46·(DW_OP_reg13·(r13)) |
62462 | ····000309f1·<End·of·list> | 62462 | ····000309f1·<End·of·list> |
Offset 78314, 37 lines modified | Offset 78314, 37 lines modified | ||
78314 | ····0003d069·<End·of·list> | 78314 | ····0003d069·<End·of·list> |
78315 | ····0003d06a·v000000000000000·v000000000000000·location·view·pair | 78315 | ····0003d06a·v000000000000000·v000000000000000·location·view·pair |
78316 | ····0003d06c·v000000000000000·v000000000000000·location·view·pair | 78316 | ····0003d06c·v000000000000000·v000000000000000·location·view·pair |
78317 | ····0003d06e·0000000000034148·(base·address) | 78317 | ····0003d06e·0000000000034148·(base·address) |
78318 | ····0003d077·v000000000000000·v000000000000000·views·at·0003d06a·for: | 78318 | ····0003d077·v000000000000000·v000000000000000·views·at·0003d06a·for: |
78319 | ·············0000000000034148·0000000000034192·(DW_OP_implicit_pointer:·<0x3c8 | 78319 | ·············0000000000034148·0000000000034192·(DW_OP_implicit_pointer:·<0x3c823>·0) |
78320 | ····0003d081·v000000000000000·v000000000000000·views·at·0003d06c·for: | 78320 | ····0003d081·v000000000000000·v000000000000000·views·at·0003d06c·for: |
78321 | ·············0000000000035475·00000000000354b5·(DW_OP_implicit_pointer:·<0x3c8 | 78321 | ·············0000000000035475·00000000000354b5·(DW_OP_implicit_pointer:·<0x3c823>·0) |
78322 | ····0003d08d·<End·of·list> | 78322 | ····0003d08d·<End·of·list> |
78323 | ····0003d08e·v000000000000000·v000000000000000·location·view·pair | 78323 | ····0003d08e·v000000000000000·v000000000000000·location·view·pair |
78324 | ····0003d090·v000000000000000·v000000000000000·location·view·pair | 78324 | ····0003d090·v000000000000000·v000000000000000·location·view·pair |
78325 | ····0003d092·0000000000034148·(base·address) | 78325 | ····0003d092·0000000000034148·(base·address) |
78326 | ····0003d09b·v000000000000000·v000000000000000·views·at·0003d08e·for: | 78326 | ····0003d09b·v000000000000000·v000000000000000·views·at·0003d08e·for: |
78327 | ·············0000000000034148·0000000000034192·(DW_OP_implicit_pointer:·<0x3c83 | 78327 | ·············0000000000034148·0000000000034192·(DW_OP_implicit_pointer:·<0x3c837>·0) |
78328 | ····0003d0a5·v000000000000000·v000000000000000·views·at·0003d090·for: | 78328 | ····0003d0a5·v000000000000000·v000000000000000·views·at·0003d090·for: |
78329 | ·············0000000000035475·00000000000354b5·(DW_OP_implicit_pointer:·<0x3c83 | 78329 | ·············0000000000035475·00000000000354b5·(DW_OP_implicit_pointer:·<0x3c837>·0) |
78330 | ····0003d0b1·<End·of·list> | 78330 | ····0003d0b1·<End·of·list> |
78331 | ····0003d0b2·v000000000000000·v000000000000000·location·view·pair | 78331 | ····0003d0b2·v000000000000000·v000000000000000·location·view·pair |
78332 | ····0003d0b4·v000000000000000·v000000000000000·location·view·pair | 78332 | ····0003d0b4·v000000000000000·v000000000000000·location·view·pair |
78333 | ····0003d0b6·0000000000034148·(base·address) | 78333 | ····0003d0b6·0000000000034148·(base·address) |
78334 | ····0003d0bf·v000000000000000·v000000000000000·views·at·0003d0b2·for: | 78334 | ····0003d0bf·v000000000000000·v000000000000000·views·at·0003d0b2·for: |
78335 | ·············0000000000034148·0000000000034192·(DW_OP_implicit_pointer:·<0x3c84 | 78335 | ·············0000000000034148·0000000000034192·(DW_OP_implicit_pointer:·<0x3c84b>·0) |
78336 | ····0003d0c9·v000000000000000·v000000000000000·views·at·0003d0b4·for: | 78336 | ····0003d0c9·v000000000000000·v000000000000000·views·at·0003d0b4·for: |
78337 | ·············0000000000035475·00000000000354b5·(DW_OP_implicit_pointer:·<0x3c84 | 78337 | ·············0000000000035475·00000000000354b5·(DW_OP_implicit_pointer:·<0x3c84b>·0) |
78338 | ····0003d0d5·<End·of·list> | 78338 | ····0003d0d5·<End·of·list> |
78339 | ····0003d0d6·v000000000000000·v000000000000005·location·view·pair | 78339 | ····0003d0d6·v000000000000000·v000000000000005·location·view·pair |
78340 | ····0003d0d8·v000000000000005·v000000000000000·location·view·pair | 78340 | ····0003d0d8·v000000000000005·v000000000000000·location·view·pair |
78341 | ····0003d0da·v000000000000000·v000000000000000·location·view·pair | 78341 | ····0003d0da·v000000000000000·v000000000000000·location·view·pair |
78342 | ····0003d0dc·0000000000035475·(base·address) | 78342 | ····0003d0dc·0000000000035475·(base·address) |
Offset 79390, 37 lines modified | Offset 79390, 37 lines modified | ||
79390 | ····0003dc11·<End·of·list> | 79390 | ····0003dc11·<End·of·list> |
79391 | ····0003dc12·v000000000000000·v000000000000000·location·view·pair | 79391 | ····0003dc12·v000000000000000·v000000000000000·location·view·pair |
79392 | ····0003dc14·v000000000000000·v000000000000000·location·view·pair | 79392 | ····0003dc14·v000000000000000·v000000000000000·location·view·pair |
79393 | ····0003dc16·0000000000033849·(base·address) | 79393 | ····0003dc16·0000000000033849·(base·address) |
79394 | ····0003dc1f·v000000000000000·v000000000000000·views·at·0003dc12·for: | 79394 | ····0003dc1f·v000000000000000·v000000000000000·views·at·0003dc12·for: |
79395 | ·············0000000000033849·000000000003387a·(DW_OP_implicit_pointer:·<0x3c7a | 79395 | ·············0000000000033849·000000000003387a·(DW_OP_implicit_pointer:·<0x3c7ab>·0) |
79396 | ····0003dc29·v000000000000000·v000000000000000·views·at·0003dc14·for: | 79396 | ····0003dc29·v000000000000000·v000000000000000·views·at·0003dc14·for: |
79397 | ·············0000000000034466·000000000003449c·(DW_OP_implicit_pointer:·<0x3c7a | 79397 | ·············0000000000034466·000000000003449c·(DW_OP_implicit_pointer:·<0x3c7ab>·0) |
79398 | ····0003dc35·<End·of·list> | 79398 | ····0003dc35·<End·of·list> |
79399 | ····0003dc36·v000000000000000·v000000000000000·location·view·pair | 79399 | ····0003dc36·v000000000000000·v000000000000000·location·view·pair |
79400 | ····0003dc38·v000000000000000·v000000000000000·location·view·pair | 79400 | ····0003dc38·v000000000000000·v000000000000000·location·view·pair |
79401 | ····0003dc3a·0000000000033849·(base·address) | 79401 | ····0003dc3a·0000000000033849·(base·address) |
79402 | ····0003dc43·v000000000000000·v000000000000000·views·at·0003dc36·for: | 79402 | ····0003dc43·v000000000000000·v000000000000000·views·at·0003dc36·for: |
79403 | ·············0000000000033849·000000000003387a·(DW_OP_implicit_pointer:·<0x3c7b | 79403 | ·············0000000000033849·000000000003387a·(DW_OP_implicit_pointer:·<0x3c7bf>·0) |
79404 | ····0003dc4d·v000000000000000·v000000000000000·views·at·0003dc38·for: | 79404 | ····0003dc4d·v000000000000000·v000000000000000·views·at·0003dc38·for: |
79405 | ·············0000000000034466·000000000003449c·(DW_OP_implicit_pointer:·<0x3c7b | 79405 | ·············0000000000034466·000000000003449c·(DW_OP_implicit_pointer:·<0x3c7bf>·0) |
79406 | ····0003dc59·<End·of·list> | 79406 | ····0003dc59·<End·of·list> |
79407 | ····0003dc5a·v000000000000000·v000000000000000·location·view·pair | 79407 | ····0003dc5a·v000000000000000·v000000000000000·location·view·pair |
79408 | ····0003dc5c·v000000000000000·v000000000000000·location·view·pair | 79408 | ····0003dc5c·v000000000000000·v000000000000000·location·view·pair |
79409 | ····0003dc5e·0000000000033849·(base·address) | 79409 | ····0003dc5e·0000000000033849·(base·address) |
79410 | ····0003dc67·v000000000000000·v000000000000000·views·at·0003dc5a·for: | 79410 | ····0003dc67·v000000000000000·v000000000000000·views·at·0003dc5a·for: |
79411 | ·············0000000000033849·000000000003387a·(DW_OP_implicit_pointer:·<0x3c7 | 79411 | ·············0000000000033849·000000000003387a·(DW_OP_implicit_pointer:·<0x3c7d3>·0) |
79412 | ····0003dc71·v000000000000000·v000000000000000·views·at·0003dc5c·for: | 79412 | ····0003dc71·v000000000000000·v000000000000000·views·at·0003dc5c·for: |
79413 | ·············0000000000034466·000000000003449c·(DW_OP_implicit_pointer:·<0x3c7 | 79413 | ·············0000000000034466·000000000003449c·(DW_OP_implicit_pointer:·<0x3c7d3>·0) |
79414 | ····0003dc7d·<End·of·list> | 79414 | ····0003dc7d·<End·of·list> |
79415 | ····0003dc7e·v000000000000000·v000000000000005·location·view·pair | 79415 | ····0003dc7e·v000000000000000·v000000000000005·location·view·pair |
79416 | ····0003dc80·v000000000000005·v000000000000000·location·view·pair | 79416 | ····0003dc80·v000000000000005·v000000000000000·location·view·pair |
79417 | ····0003dc82·v000000000000000·v000000000000000·location·view·pair | 79417 | ····0003dc82·v000000000000000·v000000000000000·location·view·pair |
79418 | ····0003dc84·0000000000034466·(base·address) | 79418 | ····0003dc84·0000000000034466·(base·address) |
Offset 94973, 32 lines modified | Offset 94973, 32 lines modified | ||
94973 | ····00049967·v000000000000004·v000000000000000·location·view·pair | 94973 | ····00049967·v000000000000004·v000000000000000·location·view·pair |
94974 | ····00049969·v000000000000000·v000000000000000·location·view·pair | 94974 | ····00049969·v000000000000000·v000000000000000·location·view·pair |
94975 | ····0004996b·v000000000000005·v000000000000004·location·view·pair | 94975 | ····0004996b·v000000000000005·v000000000000004·location·view·pair |
94976 | ····0004996d·00000000000240bc·(base·address) | 94976 | ····0004996d·00000000000240bc·(base·address) |
94977 | ····00049976·v000000000000004·v000000000000000·views·at·00049967·for: | 94977 | ····00049976·v000000000000004·v000000000000000·views·at·00049967·for: |
94978 | ·············00000000000240bc·0000000000024121·(DW_OP_implicit_pointer:·<0x4aba | 94978 | ·············00000000000240bc·0000000000024121·(DW_OP_implicit_pointer:·<0x4abaf>·0) |
94979 | ····00049980·v000000000000000·v000000000000000·views·at·00049969·for: | 94979 | ····00049980·v000000000000000·v000000000000000·views·at·00049969·for: |
94980 | ·············0000000000024579·0000000000024583·(DW_OP_implicit_pointer:·<0x4aba | 94980 | ·············0000000000024579·0000000000024583·(DW_OP_implicit_pointer:·<0x4abaf>·0) |
94981 | ····0004998c·v000000000000005·v000000000000004·views·at·0004996b·for: | 94981 | ····0004998c·v000000000000005·v000000000000004·views·at·0004996b·for: |
Max diff block lines reached; 40686/48635 bytes (83.66%) of diff not shown. |
Offset 1, 73 lines modified | Offset 1, 67 lines modified | ||
1 | GCC:·(Debian·14.2.0-19)·14.2.0 | 1 | GCC:·(Debian·14.2.0-19)·14.2.0 |
2 | 9[=r6Fn-` | ||
3 | 5C.» 5Pglrz | ||
4 | iOsp4Sl[* | ||
5 | OiA_RtWIH | ||
6 | jBNdgs5aSd+s5a3# | ||
7 | F#_;Qbhx | ||
8 | bU@HGsE)· | ||
9 | z@WWJ")4 | ||
10 | au\ZlR+K | ||
11 | 7F>r`IG9 | ||
12 | NsKm3L|& | ||
13 | VApF>n2_ | ||
14 | t8sRtP|K] | ||
15 | &·otd%e= | ||
16 | A`8pjI;o& | ||
17 | 2 | ;[<v6Dn-` | |
3 | 3vORf.6~ | ||
4 | r*y|DM%c | ||
5 | <UCU53oS5 | ||
6 | WJE2·gORd | ||
7 | -4}2h3t;[ | ||
8 | R» UPs2]7]'eo | ||
9 | i/l8C#3i | ||
10 | F>gO@.Ve | ||
11 | {p^hp^F6F | ||
12 | M-!hMhqR | ||
13 | 3bDHGc~?2 | ||
14 | EpzAzDO)P | ||
15 | t)/gE%TH | ||
16 | FjZ#?X#] | ||
17 | &{:h{ob7 | ||
18 | [$I-·8#S-* | ||
19 | S,FrBp?· | ||
20 | ErLxU(·q | ||
21 | ·>=BhVbL | ||
18 | >a~q | 22 | v>a~q6z;86i= |
23 | Tf_.d~Wr | ||
24 | sUG&QIo] | ||
25 | 'sS?·9e# | ||
26 | 6EP34Li3Nk | ||
27 | K» [Qc#K` | ||
28 | To%p+H=wD | ||
29 | RMzCsdJ> | ||
30 | w&%:73)qQ | ||
31 | fGDIO\5? | ||
32 | yD<lM*p(- | ||
33 | 1xHG+» WW | ||
34 | ·{<RPa8w | ||
35 | N-4nQ!NDX | ||
36 | ^=[LiJZW | ||
37 | ·U/eZtdq.vf | ||
38 | yOM9eKzg | ||
39 | >.U)1O}] | ||
40 | Oy$4*B~# | ||
41 | 58vczjtPf | ||
42 | {XYGRt4dB | ||
19 | b6;c/Wp.pGH"K | ||
20 | ]]-uUf4r | ||
21 | WQ{jU>\e | ||
22 | #Z}Gj!x% | ||
23 | -p_1» sz<mu | ||
24 | ;%[N{-E= | ||
25 | zD:x6p3I# | ||
26 | vek·?» eW | ||
27 | ·o*>+o7>E | ||
28 | k6-"Cn+6 | ||
29 | fsTkS2&d | ||
30 | b-]diybS | ||
31 | 1XpJD>QpZ | ||
32 | +847`9%t | ||
33 | N-5·|-j'q | ||
34 | |z?WgmD? | ||
35 | Qe[yB[Ao>" | ||
36 | 4?am5]%!1o | ||
37 | Ge~~d"W!U | ||
38 | bqb/'Ve") | ||
39 | 'M4':cth | ||
40 | &)}~YwV5 | ||
41 | mx2o&lvQ) | ||
42 | #m!)z=0c·7 | ||
43 | VA60&s5u | ||
44 | uf;}"X*`^ | 43 | uf;}"X*`^B |
44 | @4G%yl9P | ||
45 | yMHW&4Df | ||
46 | 4Nl1<rHrO | ||
47 | c_m.eijx | ||
48 | _k#y*h1m | ||
49 | 8Lo·v<1p | ||
50 | .}HSSOo·_ | ||
51 | "Nw-QJv|f | ||
52 | I='·TK=7!\ | ||
53 | c5i8-mvZ | ||
54 | @<d-zQ~n" | ||
55 | }Xi{H`rRUk | ||
56 | Za2@|FJ>' | ||
57 | og>:|b?0 | ||
58 | u8nU>;&V | ||
59 | hMRLDa<5 | ||
60 | gX4."Qnq | ||
45 | 6r??6&'u&^Ml | ||
46 | )FxoM» M; | ||
47 | qN6B?k"u:s | ||
48 | :>:n3^?. | ||
49 | uN)aFxn»+ | ||
50 | *!N'f"qEF·}j | ||
51 | (dO·{(=_B | ||
52 | rW@Z|/Zr | ||
53 | cRD0UJLQ | ||
54 | 24/6Mce4 | ||
55 | KE$YPQn%W | ||
56 | </3i]a:; | ||
57 | 0X\<OFVy | ||
58 | 9j0·|1vt | ||
59 | )DiT-h$H | ||
60 | ?T_<c!|4 | ||
61 | tv=·|O0M | ||
62 | \OfhJeCp | ||
63 | m'HCqhhKp | ||
64 | S5lJ+HV_ | ||
65 | lE>K#L%78 | ||
66 | rs7J^~p" | ||
67 | 2s%\O#Uq | 61 | 2s%\O#Uq |
68 | iaeOh`.4 | 62 | iaeOh`.4 |
69 | p){[k/;g$E | 63 | p){[k/;g$E |
70 | ,E1|*uJw# | 64 | ,E1|*uJw# |
71 | e*XE.9Pj | 65 | e*XE.9Pj |
Max diff block lines reached; 1034/2487 bytes (41.58%) of diff not shown. |