{"id":443650,"date":"2024-12-28T03:01:15","date_gmt":"2024-12-28T03:01:15","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=443650"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=443650","title":{"rendered":"<span>Polars vs Pandas: \u0431\u0438\u0442\u0432\u0430 \u0442\u0438\u0442\u0430\u043d\u043e\u0432. \u041a\u0442\u043e \u043a\u043e\u0433\u043e?<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u042d\u0442\u043e \u041b\u0435\u0448\u0430 \u0416\u0438\u0440\u044f\u043a\u043e\u0432, \u0442\u0435\u0445\u043b\u0438\u0434 backend-\u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432\u0438\u0442\u0440\u0438\u043d\u044b \u043e\u043d\u043b\u0430\u0439\u043d-\u043a\u0438\u043d\u043e\u0442\u0435\u0430\u0442\u0440\u0430 KION. \u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b <a href=\"https:\/\/habr.com\/ru\/companies\/ru_mts\/articles\/868388\/\">\u043f\u0440\u043e \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b Pandas<\/a>, \u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0431\u0443\u0434\u0435\u043c \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0434\u0432\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u2014 Polars \u0438 Pandas. \u041e\u0431\u0441\u0443\u0434\u0438\u043c, \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0435\u0441\u0442\u044c \u0443 Polars \u0438 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0447\u0435\u0433\u043e \u043e\u043d\u0430 \u0432\u044b\u0438\u0433\u0440\u044b\u0432\u0430\u0435\u0442 \u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0412 \u043f\u043e\u0441\u0442\u0435 \u2014 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043d\u043e \u043c\u043d\u0435\u043d\u0438\u044f \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0432\u043e\u0434\u0443, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0440\u0430\u0437\u043d\u044b\u0435. \u041f\u0438\u0448\u0438\u0442\u0435, \u0447\u0442\u043e \u0434\u0443\u043c\u0430\u0435\u0442\u0435, \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u2014 \u0431\u0443\u0434\u0435\u043c \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0442\u044c!<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/703\/820\/e1d\/703820e1d8147fb68f4757691027eb04.png\" width=\"1249\" height=\"702\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/703\/820\/e1d\/703820e1d8147fb68f4757691027eb04.png\"\/><\/figure>\n<h2>\u0427\u0442\u043e \u0437\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0442\u0430\u043a\u0438\u0435 <\/h2>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043c \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 \u044d\u0442\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432. <\/p>\n<h3>Pandas<\/h3>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/e98\/20d\/0fd\/e9820d0fdadfd20a79e5fecbef4d6742.jpg\" width=\"2997\" height=\"954\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e98\/20d\/0fd\/e9820d0fdadfd20a79e5fecbef4d6742.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>Pandas <a href=\"https:\/\/github.com\/pandas-dev\/pandas\">\u0441\u043e\u0437\u0434\u0430\u043d\u0430<\/a> \u0432 2008 \u0433\u043e\u0434\u0443 \u0423\u044d\u0441\u043e\u043c \u041c\u0430\u043a\u041a\u0438\u043d\u043d\u0438 \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 AQR Capital Management. \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u2014 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0438\u0445 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435, \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044e, \u0430\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u044e \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e. \u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043e\u043d\u0430 \u043d\u0430 Python, \u0441 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438, \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u043d\u0430 Cython. <\/p>\n<p>Pandas \u2014 \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u043e \u0447\u0435\u043c \u0441\u0432\u0438\u0434\u0435\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0443\u044e\u0442 40+ \u0442\u044b\u0441\u044f\u0447 \u0437\u0432\u0435\u0437\u0434 \u043d\u0430 GitHub.<a href=\"https:\/\/github.com\/pandas-dev\/pandas\"> <\/a><\/p>\n<p>\u0427\u0442\u043e \u043f\u043e \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430\u043c: <\/p>\n<ul>\n<li>\n<p><strong>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438<\/strong>: \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c\u0430. \u0422\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c\u043e\u0432 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c\u0438 NumPy. \u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 2.0 <a href=\"https:\/\/nuancesprog.ru\/p\/18840\/\"><u>\u043c\u043e\u0436\u043d\u043e<\/u><\/a> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c PyArrow \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0432\u0435\u0437\u0434 \u043d\u0430 GitHub<\/strong>: 44,1 \u0442\u044b\u0441.<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 Issues<\/strong>: ~3,6 \u0442\u044b\u0441\u044f\u0447 \u2014 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e \u043d\u0430 \u0434\u0435\u043a\u0430\u0431\u0440\u044c 2024 \u0433\u043e\u0434\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u0435\u0440\u0441\u0438\u044f<\/strong>: 2.2.3.\u00a0<\/p>\n<\/li>\n<li>\n<p><strong>Merge Requests (MRs)<\/strong>: \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438 \u0438 \u0448\u0438\u0440\u043e\u043a\u0438\u043c \u043a\u043e\u043c\u044c\u044e\u043d\u0438\u0442\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 <a href=\"https:\/\/github.com\/pandas-dev\/pandas\">\u0442\u0443\u0442<\/a>.<\/p>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 2.0 \u0432 Pandas <a href=\"https:\/\/pandas.pydata.org\/pandas-docs\/stable\/\/user_guide\/copy_on_write.html\">\u0431\u044b\u043b\u0430 \u0432\u0432\u0435\u0434\u0435\u043d\u0430 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f Copy-on-Write<\/a> (CoW), \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0449\u0430\u044f \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e: \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430. \u041f\u0440\u0438 \u0435\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0442\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0430 \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c. DuckDB\/Dask \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 out-of-core.<\/p>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438:<\/p>\n<ul>\n<li>\n<p><strong>DataFrame \u0438 Series<\/strong>.<strong> <\/strong>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445 Pandas, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0449\u0438\u0435 \u0443\u0434\u043e\u0431\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u043c\u0438 (DataFrame) \u0438 \u043e\u0434\u043d\u043e\u043c\u0435\u0440\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 (Series). \u041f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043b\u0435\u0433\u043a\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c, \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>NumPy<\/strong>.<strong> <\/strong>Pandas \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043d\u0430 \u0431\u0430\u0437\u0435 NumPy \u2014\u00a0 \u044d\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<li>\n<p><strong>\u0427\u0442\u0435\u043d\u0438\u0435 \u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0445<\/strong>.<strong> <\/strong>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432 \u2014 CSV, Excel, SQL, JSON \u2014 \u0434\u0435\u043b\u0430\u0435\u0442 Pandas \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u0413\u0438\u0431\u043a\u0430\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u044f. <\/strong>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u0435\u0442\u043a\u0430\u043c\u0438 \u0438 \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u043c\u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c\u0438 \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043c\u043d\u043e\u0433\u043e\u043c\u0435\u0440\u043d\u043e\u0439 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438 (MultiIndex) \u0443\u043f\u0440\u043e\u0449\u0430\u044e\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043b\u044e\u0431\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438.<\/p>\n<\/li>\n<\/ul>\n<h3>Polars <\/h3>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/b54\/b9c\/ac2\/b54b9cac2fb130074543494c2a37ad19.jpg\" width=\"1293\" height=\"668\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b54\/b9c\/ac2\/b54b9cac2fb130074543494c2a37ad19.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 <a href=\"https:\/\/github.com\/pola-rs\/polars\">Polars<\/a> \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u2014 \u0432 2020 \u0433\u043e\u0434\u0443. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u0430 \u043e\u043d\u0430 \u0441 \u0443\u043f\u043e\u0440\u043e\u043c \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u0421\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044c \u2014 \u0420\u0435\u0439\u043d\u0430\u0440\u0441 \u0412\u0435\u0433\u0438\u0441. Polars \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u0431\u044b\u0441\u0442\u0440\u043e\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043e\u0431\u044a\u0435\u043c\u043e\u0432 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 Rust. \u041d\u0430 GitHub \u0443 \u043d\u0435\u0435 4,5 \u0442\u044b\u0441\u044f\u0447\u0438 \u0437\u0432\u0435\u0437\u0434.<\/p>\n<p>\u0427\u0442\u043e \u043f\u043e \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430\u043c:<\/p>\n<ul>\n<li>\n<p><strong>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438<\/strong>: \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043a\u043e\u043b\u043e\u043d\u043e\u0447\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 Apache Arrow \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0432\u0435\u0437\u0434 \u043d\u0430 GitHub<\/strong>: 31 \u0442\u044b\u0441.<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 Issues<\/strong>: 2,1 \u0442\u044b\u0441\u044f\u0447 \u2014 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e \u043d\u0430 \u0434\u0435\u043a\u0430\u0431\u0440\u044c 2024 \u0433\u043e\u0434\u0430. <\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u0435\u0440\u0441\u0438\u044f<\/strong>: 1.17.1.<\/p>\n<\/li>\n<li>\n<p><strong>Merge Requests (MRs)<\/strong>: \u043a\u043e\u043c\u044c\u044e\u043d\u0438\u0442\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 <a href=\"https:\/\/github.com\/pola-rs\/polars\">\u0442\u0443\u0442<\/a>.<\/p>\n<p>Polars <a href=\"https:\/\/docs.pola.rs\/user-guide\/concepts\/lazy-api\/\">\u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u0432\u0430 API<\/a>: \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f (lazy evaluation) \u0438 \u043d\u0435\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 (eager evaluation). \u041e\u043d\u0430 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043e\u0431\u044a\u0435\u043c\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0435 \u0438 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0435. \u0415\u0449\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0443\u043c\u0435\u0435\u0442 \u043f\u043e\u043c\u0435\u0449\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 out-of-core-\u0440\u0435\u0436\u0438\u043c\u0435, \u043e\u0431\u0440\u0430\u0449\u0430\u044f\u0441\u044c \u043a \u0444\u0430\u0439\u043b\u0430\u043c \u043d\u0430 \u0434\u0438\u0441\u043a\u0435 \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044f \u0438\u0445 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0447\u0430\u043d\u043a\u0430\u043c\u0438.<\/p>\n<p>\u0425\u043e\u0442\u044f \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 Pandas \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u043c, Polars \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043b\u0443\u0447\u0448\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043a\u0440\u0443\u043f\u043d\u044b\u043c\u0438 \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c\u0430\u043c\u0438, \u0430 \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u044b\u0439 \u0444\u0430\u043a\u0442\u043e\u0440 \u0434\u043b\u044f \u0434\u0430\u0442\u0430-\u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432. \u041f\u0440\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043e\u0447\u0438\u0441\u0442\u043a\u0430, \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f, Polars \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u044d\u0442\u0438\u043c\u0438 \u0437\u0430\u0434\u0430\u0447\u0430\u043c\u0438 \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u0434\u0430\u0436\u0435 Pandas \u0432\u0435\u0440\u0441\u0438\u0438 2.0.<\/p>\n<h2>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u2014 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0438<\/h2>\n<h3>\u0410\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u044f<\/h3>\n<p>\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0430\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u0438 \u0432 Polars <a href=\"https:\/\/www.statology.org\/pandas-vs-polars-performance-benchmarks-for-common-data-operations\/\">\u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u0441\u0442\u0432\u043e<\/a> \u043f\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 Pandas. \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f Covertype \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 scikit-learn, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u044b\u043b\u043e 581\u00a0012 \u0441\u0442\u0440\u043e\u043a \u0438 54 \u0441\u0442\u043e\u043b\u0431\u0446\u0430. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0430\u0441\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u0445 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432.<\/p>\n<details class=\"spoiler\">\n<summary>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"css\"># Pandas start_time = time.time() mean_pandas = df_pandas.drop('target', axis=1).mean() pandas_time = time.time() - start_time  # Polars start_time = time.time() mean_polars = df_polars.select(pl.all().exclude('target')).mean() polars_time = time.time() - start_time  print(f\"Pandas aggregation time: {pandas_time:.4f} seconds\") print(f\"Polars aggregation time: {polars_time:.4f} seconds\") print(f\"Polars is {pandas_time\/polars_time:.2f}x faster than Pandas\")<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438, \u0447\u0442\u043e Polars \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u0430\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u0438 \u0437\u0430 0,0083 \u0441\u0435\u043a., \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a Pandas \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c 0,1863 \u0441\u0435\u043a. \u0417\u043d\u0430\u0447\u0438\u0442, Polars \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0435\u043c \u0432 22 \u0440\u0430\u0437\u0430 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 Pandas.<\/p>\n<p>\u0422\u0430\u043a\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u044e\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Polars \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Rust, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043e\u0431\u044a\u0435\u043c\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h3>\u0421\u043b\u0438\u044f\u043d\u0438\u0435, \u0438\u043b\u0438 join<\/h3>\n<p>\u0422\u043e\u0442 \u0436\u0435 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 <a href=\"https:\/\/www.statology.org\/pandas-vs-polars-performance-benchmarks-for-common-data-operations\/\">\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f<\/a> \u0438 \u0434\u043b\u044f \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0430 \u043f\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438, \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0432 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0430\u0441\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f, \u0433\u0434\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u0441\u0442\u043e\u043b\u0431\u0446\u0435 &#8216;feature_0&#8217; \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u043b\u043e \u0441\u0440\u0435\u0434\u043d\u0435\u0435.<\/p>\n<details class=\"spoiler\">\n<summary>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"css\"># Pandas start_time = time.time() filtered_pandas = df_pandas[df_pandas['feature_0'] &gt; df_pandas['feature_0'].mean()] pandas_time = time.time() - start_time  # Polars start_time = time.time() filtered_polars = df_polars.filter(pl.col('feature_0') &gt; pl.col('feature_0').mean()) polars_time = time.time() - start_time  print(f\"Pandas filtering time: {pandas_time:.4f} seconds\") print(f\"Polars filtering time: {polars_time:.4f} seconds\") print(f\"Polars is {pandas_time\/polars_time:.2f}x faster than Pandas\") <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438, \u0447\u0442\u043e Polars \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u0437\u0430 0,0183 \u0441\u0435\u043a., \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a Pandas \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c 0,0741 \u0441\u0435\u043a. \u0422\u043e \u0435\u0441\u0442\u044c Polars \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432 \u0447\u0435\u0442\u044b\u0440\u0435 \u0440\u0430\u0437\u0430 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 Pandas.<\/p>\n<h3>\u0413\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u0438\u043b\u0438 GroupBy Operation<\/h3>\n<p>\u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f <a href=\"https:\/\/www.statology.org\/pandas-vs-polars-performance-benchmarks-for-common-data-operations\/\">\u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0430\u0441\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438<\/a> \u043f\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0443 &#8216;target&#8217; \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435\u043c \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b.<\/p>\n<details class=\"spoiler\">\n<summary>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"css\"># Pandas start_time = time.time() grouped_pandas = df_pandas.groupby('target').mean() pandas_time = time.time() - start_time  # Polars start_time = time.time() grouped_polars = df_polars.group_by('target').agg(pl.all().exclude('target').mean()) polars_time = time.time() - start_time  print(f\"Pandas groupby time: {pandas_time:.4f} seconds\") print(f\"Polars groupby time: {polars_time:.4f} seconds\") print(f\"Polars is {pandas_time\/polars_time:.2f}x faster than Pandas\")<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438, \u0447\u0442\u043e Polars \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u0437\u0430 0,201 \u0441\u0435\u043a., \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a Pandas \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c 1,100 \u0441\u0435\u043a. Polars \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432 5,5 \u0440\u0430\u0437 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 Pandas.<\/p>\n<h3>\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430, \u0438\u043b\u0438 sorting<\/h3>\n<p>\u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0430\u0441\u044c <a href=\"https:\/\/www.statology.org\/pandas-vs-polars-performance-benchmarks-for-common-data-operations\/\">\u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u043f\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0443 &#8216;Elevation&#8217;<\/a>.<\/p>\n<details class=\"spoiler\">\n<summary>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"css\"># Pandas start_time = time.time() sorted_pandas = df_pandas.sort_values('feature_0', ascending=False) pandas_time = time.time() - start_time  # Polars start_time = time.time() sorted_polars = df_polars.sort('feature_0', descending=True) polars_time = time.time() - start_time  print(f\"Pandas sorting time: {pandas_time:.4f} seconds\") print(f\"Polars sorting time: {polars_time:.4f} seconds\") print(f\"Polars is {pandas_time\/polars_time:.2f}x faster than Pandas\")<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438, \u0447\u0442\u043e Polars \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u0437\u0430 0,0656 \u0441\u0435\u043a., \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a Pandas \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c 0,2027 \u0441\u0435\u043a. Polars \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432 \u0442\u0440\u0438 \u0440\u0430\u0437\u0430 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 Pandas.<\/p>\n<h3>\u0418\u043d\u0436\u0438\u043d\u0438\u0440\u0438\u043d\u0433 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u0438\u043b\u0438 feature engineering<\/h3>\n<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043b\u0430 \u0432 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 Z-\u043e\u0446\u0435\u043d\u043a\u0438 <a href=\"https:\/\/www.statology.org\/pandas-vs-polars-performance-benchmarks-for-common-data-operations\/\">\u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0441\u0442\u043e\u043b\u0431\u0446\u0435 &#8216;feature_0&#8217;<\/a>. \u042d\u0442\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435.<\/p>\n<details class=\"spoiler\">\n<summary>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"css\"># Pandas start_time = time.time() pandas_zscore = df_pandas.copy() for column in pandas_zscore.columns[:-1]:  # Exclude the target column     pandas_zscore[f'{column}_zscore'] = (pandas_zscore[column] - pandas_zscore[column].mean()) \/ pandas_zscore[column].std() pandas_time = time.time() - start_time  # Polars start_time = time.time() feature_cols = [f'feature_{i}' for i in range(54)] polars_zscore = df_polars.with_columns([     ((pl.col(col) - pl.col(col).mean()) \/ pl.col(col).std()).alias(f'{col}_zscore')     for col in feature_cols ]) polars_time = time.time() - start_time  print(f\"Pandas z-score calculation time: {pandas_time:.4f} seconds\") print(f\"Polars z-score calculation time: {polars_time:.4f} seconds\") print(f\"Polars is {pandas_time\/polars_time:.2f}x faster than Pandas\") <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438, \u0447\u0442\u043e Polars \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 Z-\u043e\u0446\u0435\u043d\u043a\u0438 \u0434\u043b\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0430 0,0919 \u0441\u0435\u043a., \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a Pandas \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c 0,5154 \u0441\u0435\u043a. \u0412\u044b\u0432\u043e\u0434 \u2014 Polars \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432 5,6 \u0440\u0430\u0437\u0430 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 Pandas.<\/p>\n<h2>\u041f\u043e\u0447\u0435\u043c\u0443 Polars \u0431\u044b\u0441\u0442\u0440\u0435\u0435<\/h2>\n<p>\u0423 Pandas \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u044e\u0449\u0438\u043c\u0438 \u043e\u0431\u044a\u0435\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438. \u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0431\u0430\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 NumPy \u2014\u00a0\u044d\u0442\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u043c\u0435\u0449\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u044c \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430. \u0414\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043d\u0430\u0431\u043e\u0440\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a Dask.<\/p>\n<p>Polars \u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430 Rust \u2014 \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043b\u0430\u0432\u0438\u0442\u0441\u044f \u0441\u0432\u043e\u0435\u0439 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e. Rust \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u0438 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0433\u043e\u043d\u043a\u0438. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435 Polars \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439:<\/p>\n<ul>\n<li>\n<p><strong>Arrow Columnar Format<\/strong> \u2014 \u0444\u043e\u0440\u043c\u0430\u0442 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430. \u0414\u0430\u043d\u043d\u044b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u043a\u043e\u043b\u043e\u043d\u043a\u0430\u0445, \u0442\u0430\u043a \u0447\u0442\u043e \u0447\u0442\u0435\u043d\u0438\u0435 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>Lazy Execution<\/strong> \u2014 \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043b\u0430\u043d \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043b\u0438\u0448\u043d\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>\u041c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c<\/strong> \u2014 Polars \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u0441\u0435 \u044f\u0434\u0440\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u0434\u0430\u0447.<\/p>\n<\/li>\n<li>\n<p><strong>Memory Mapping<\/strong> \u2014 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0441 \u0434\u0438\u0441\u043a\u0430, \u043d\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044f \u0432\u0435\u0441\u044c \u043e\u0431\u044a\u0435\u043c \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c.<\/p>\n<\/li>\n<\/ul>\n<p>\u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f API, \u0442\u043e \u0443 Polars \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 DataFrame API (\u0438\u043c\u043c\u0443\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u044b\u0439, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 Pandas), \u0430 \u0435\u0449\u0435 \u0435\u0441\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 SQL.<\/p>\n<p>\u0412 \u0446\u0435\u043b\u043e\u043c, Pandas \u0438 Polars \u2014 \u043c\u043e\u0449\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Polars \u0432\u044b\u0438\u0433\u0440\u044b\u0432\u0430\u0435\u0442 \u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u0438. \u041e\u043d\u0430 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043d\u0430\u0431\u043e\u0440\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432\u043e \u043c\u043d\u043e\u0433\u043e\u043c \u043a\u0430\u043a \u0440\u0430\u0437 \u0438\u0437-\u0437\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439 \u0438 \u044f\u0437\u044b\u043a\u0430 Rust. \u041d\u043e Pandas \u0441\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0442\u043e\u0436\u0435 \u043d\u0435\u043b\u044c\u0437\u044f, \u043e\u043d\u0430 \u0431\u044b\u043b\u0430 \u0438 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0432\u044b\u0431\u043e\u0440\u043e\u043c \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043e\u0431\u044a\u0435\u043c\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447, \u043f\u043b\u044e\u0441 \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c \u0438 \u043f\u0440\u043e \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435 \u0443 Pandas \u043e\u0434\u043d\u043e \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432 \u0441\u0440\u0435\u0434\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python.<\/p>\n<p>\u0418 \u043d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a. Polars \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u0438\u0442 Pandas \u0438 \u043f\u043e \u043b\u043e\u0433\u043e\u0442\u0438\u043f\u0443. \u0411\u0435\u043b\u044b\u0439 \u043c\u0435\u0434\u0432\u0435\u0434\u044c, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043f\u0430\u043d\u0434\u044b, \u2014 \u0441\u0430\u043c\u044b\u0439 \u043a\u0440\u0443\u043f\u043d\u044b\u0439 \u0441\u0443\u0445\u043e\u043f\u0443\u0442\u043d\u044b\u0439 \u0445\u0438\u0449\u043d\u0438\u043a \u043d\u0430 \u0417\u0435\u043c\u043b\u0435: \u0434\u043b\u0438\u043d\u0430 \u0442\u0435\u043b\u0430 \u043c\u043e\u0436\u0435\u0442 \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0442\u044c 3 \u043c\u0435\u0442\u0440\u043e\u0432. \u041e\u043d \u043c\u043e\u0436\u0435\u0442 \u0443\u0447\u0443\u044f\u0442\u044c \u0434\u043e\u0431\u044b\u0447\u0443 \u043d\u0430 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043e\u043a\u043e\u043b\u043e \u043a\u0438\u043b\u043e\u043c\u0435\u0442\u0440\u0430 \u043f\u043e\u0434 \u043c\u0435\u0442\u0440\u043e\u0432\u043e\u0439 \u0442\u043e\u043b\u0449\u0438\u043d\u043e\u0439 \u0441\u043d\u0435\u0433\u0430, \u043f\u0440\u043e\u043f\u043b\u044b\u0442\u044c \u0431\u0435\u0437 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 687 \u043a\u043c (\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0440\u0435\u043a\u043e\u0440\u0434) \u0438 \u043c\u043d\u043e\u0433\u043e \u0447\u0435\u0433\u043e \u0435\u0449\u0435. \u041d\u0443 \u0438 \u043a\u0430\u043a \u0442\u0443\u0442 \u0441 \u043d\u0438\u043c \u0431\u043e\u0440\u043e\u0442\u044c\u0441\u044f?<\/p>\n<p><em>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0430\u043c \u0441\u043b\u043e\u0432\u043e \u2014 \u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445, \u0447\u0442\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0435\u0442\u0435.<\/em> <\/p>\n<p><strong>\u0427\u0442\u043e \u0435\u0449\u0435 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c<\/strong>:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/companies\/ru_mts\/articles\/868388\/\">\u041c\u0438\u0440 \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 Pandas: \u0434\u043e\u0441\u0442\u043e\u0439\u043d\u044b\u0435 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438<\/a>     <\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/870266\/\"> https:\/\/habr.com\/ru\/articles\/870266\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u042d\u0442\u043e \u041b\u0435\u0448\u0430 \u0416\u0438\u0440\u044f\u043a\u043e\u0432, \u0442\u0435\u0445\u043b\u0438\u0434 backend-\u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432\u0438\u0442\u0440\u0438\u043d\u044b \u043e\u043d\u043b\u0430\u0439\u043d-\u043a\u0438\u043d\u043e\u0442\u0435\u0430\u0442\u0440\u0430 KION. \u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b <a href=\"https:\/\/habr.com\/ru\/companies\/ru_mts\/articles\/868388\/\">\u043f\u0440\u043e \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b Pandas<\/a>, \u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0431\u0443\u0434\u0435\u043c \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0434\u0432\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u2014 Polars \u0438 Pandas. \u041e\u0431\u0441\u0443\u0434\u0438\u043c, \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0435\u0441\u0442\u044c \u0443 Polars \u0438 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0447\u0435\u0433\u043e \u043e\u043d\u0430 \u0432\u044b\u0438\u0433\u0440\u044b\u0432\u0430\u0435\u0442 \u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0412 \u043f\u043e\u0441\u0442\u0435 \u2014 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043d\u043e \u043c\u043d\u0435\u043d\u0438\u044f \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0432\u043e\u0434\u0443, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0440\u0430\u0437\u043d\u044b\u0435. \u041f\u0438\u0448\u0438\u0442\u0435, \u0447\u0442\u043e \u0434\u0443\u043c\u0430\u0435\u0442\u0435, \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u2014 \u0431\u0443\u0434\u0435\u043c \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0442\u044c!<\/p>\n<figure class=\"full-width\"><\/figure>\n<h2>\u0427\u0442\u043e \u0437\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0442\u0430\u043a\u0438\u0435 <\/h2>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043c \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 \u044d\u0442\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432. <\/p>\n<h3>Pandas<\/h3>\n<figure class=\"full-width\"><\/figure>\n<p>Pandas <a href=\"https:\/\/github.com\/pandas-dev\/pandas\">\u0441\u043e\u0437\u0434\u0430\u043d\u0430<\/a> \u0432 2008 \u0433\u043e\u0434\u0443 \u0423\u044d\u0441\u043e\u043c \u041c\u0430\u043a\u041a\u0438\u043d\u043d\u0438 \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 AQR Capital Management. \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u2014 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0438\u0445 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435, \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044e, \u0430\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u044e \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e. \u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043e\u043d\u0430 \u043d\u0430 Python, \u0441 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438, \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u043d\u0430 Cython. <\/p>\n<p>Pandas \u2014 \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u043e \u0447\u0435\u043c \u0441\u0432\u0438\u0434\u0435\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0443\u044e\u0442 40+ \u0442\u044b\u0441\u044f\u0447 \u0437\u0432\u0435\u0437\u0434 \u043d\u0430 GitHub.<a href=\"https:\/\/github.com\/pandas-dev\/pandas\"> <\/a><\/p>\n<p>\u0427\u0442\u043e \u043f\u043e \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430\u043c: <\/p>\n<ul>\n<li>\n<p><strong>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438<\/strong>: \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c\u0430. \u0422\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c\u043e\u0432 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c\u0438 NumPy. \u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 2.0 <a href=\"https:\/\/nuancesprog.ru\/p\/18840\/\"><u>\u043c\u043e\u0436\u043d\u043e<\/u><\/a> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c PyArrow \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0432\u0435\u0437\u0434 \u043d\u0430 GitHub<\/strong>: 44,1 \u0442\u044b\u0441.<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 Issues<\/strong>: ~3,6 \u0442\u044b\u0441\u044f\u0447 \u2014 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e \u043d\u0430 \u0434\u0435\u043a\u0430\u0431\u0440\u044c 2024 \u0433\u043e\u0434\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u0435\u0440\u0441\u0438\u044f<\/strong>: 2.2.3.\u00a0<\/p>\n<\/li>\n<li>\n<p><strong>Merge Requests (MRs)<\/strong>: \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438 \u0438 \u0448\u0438\u0440\u043e\u043a\u0438\u043c \u043a\u043e\u043c\u044c\u044e\u043d\u0438\u0442\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 <a href=\"https:\/\/github.com\/pandas-dev\/pandas\">\u0442\u0443\u0442<\/a>.<\/p>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 2.0 \u0432 Pandas <a href=\"https:\/\/pandas.pydata.org\/pandas-docs\/stable\/\/user_guide\/copy_on_write.html\">\u0431\u044b\u043b\u0430 \u0432\u0432\u0435\u0434\u0435\u043d\u0430 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f Copy-on-Write<\/a> (CoW), \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0449\u0430\u044f \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e: \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430. \u041f\u0440\u0438 \u0435\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0442\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0430 \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c. DuckDB\/Dask \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 out-of-core.<\/p>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438:<\/p>\n<ul>\n<li>\n<p><strong>DataFrame \u0438 Series<\/strong>.<strong> <\/strong>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445 Pandas, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0449\u0438\u0435 \u0443\u0434\u043e\u0431\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u043c\u0438 (DataFrame) \u0438 \u043e\u0434\u043d\u043e\u043c\u0435\u0440\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 (Series). \u041f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043b\u0435\u0433\u043a\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c, \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>NumPy<\/strong>.<strong> <\/strong>Pandas \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043d\u0430 \u0431\u0430\u0437\u0435 NumPy \u2014\u00a0 \u044d\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<li>\n<p><strong>\u0427\u0442\u0435\u043d\u0438\u0435 \u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0445<\/strong>.<strong> <\/strong>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432 \u2014 CSV, Excel, SQL, JSON \u2014 \u0434\u0435\u043b\u0430\u0435\u0442 Pandas \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u0413\u0438\u0431\u043a\u0430\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u044f. <\/strong>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u0435\u0442\u043a\u0430\u043c\u0438 \u0438 \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u043c\u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c\u0438 \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043c\u043d\u043e\u0433\u043e\u043c\u0435\u0440\u043d\u043e\u0439 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438 (MultiIndex) \u0443\u043f\u0440\u043e\u0449\u0430\u044e\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043b\u044e\u0431\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438.<\/p>\n<\/li>\n<\/ul>\n<h3>Polars <\/h3>\n<figure class=\"full-width\"><\/figure>\n<p>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 <a href=\"https:\/\/github.com\/pola-rs\/polars\">Polars<\/a> \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u2014 \u0432 2020 \u0433\u043e\u0434\u0443. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u0430 \u043e\u043d\u0430 \u0441 \u0443\u043f\u043e\u0440\u043e\u043c \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u0421\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044c \u2014 \u0420\u0435\u0439\u043d\u0430\u0440\u0441 \u0412\u0435\u0433\u0438\u0441. Polars \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u0431\u044b\u0441\u0442\u0440\u043e\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043e\u0431\u044a\u0435\u043c\u043e\u0432 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 Rust. \u041d\u0430 GitHub \u0443 \u043d\u0435\u0435 4,5 \u0442\u044b\u0441\u044f\u0447\u0438 \u0437\u0432\u0435\u0437\u0434.<\/p>\n<p>\u0427\u0442\u043e \u043f\u043e \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430\u043c:<\/p>\n<ul>\n<li>\n<p><strong>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438<\/strong>: \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043a\u043e\u043b\u043e\u043d\u043e\u0447\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 Apache Arrow \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0432\u0435\u0437\u0434 \u043d\u0430 GitHub<\/strong>: 31 \u0442\u044b\u0441.<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 Issues<\/strong>: 2,1 \u0442\u044b\u0441\u044f\u0447 \u2014 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e \u043d\u0430 \u0434\u0435\u043a\u0430\u0431\u0440\u044c 2024 \u0433\u043e\u0434\u0430. <\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u0435\u0440\u0441\u0438\u044f<\/strong>: 1.17.1.<\/p>\n<\/li>\n<li>\n<p><strong>Merge Requests (MRs)<\/strong>: \u043a\u043e\u043c\u044c\u044e\u043d\u0438\u0442\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 <a href=\"https:\/\/github.com\/pola-rs\/polars\">\u0442\u0443\u0442<\/a>.<\/p>\n<p>Polars <a href=\"https:\/\/docs.pola.rs\/user-guide\/concepts\/lazy-api\/\">\u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u0432\u0430 API<\/a>: \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f (lazy evaluation) \u0438 \u043d\u0435\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 (eager evaluation). \u041e\u043d\u0430 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043e\u0431\u044a\u0435\u043c\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0435 \u0438 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0435. \u0415\u0449\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0443\u043c\u0435\u0435\u0442 \u043f\u043e\u043c\u0435\u0449\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 out-of-core-\u0440\u0435\u0436\u0438\u043c\u0435, \u043e\u0431\u0440\u0430\u0449\u0430\u044f\u0441\u044c \u043a \u0444\u0430\u0439\u043b\u0430\u043c \u043d\u0430 \u0434\u0438\u0441\u043a\u0435 \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044f \u0438\u0445 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0447\u0430\u043d\u043a\u0430\u043c\u0438.<\/p>\n<p>\u0425\u043e\u0442\u044f \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 Pandas \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u043c, Polars \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043b\u0443\u0447\u0448\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043a\u0440\u0443\u043f\u043d\u044b\u043c\u0438 \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c\u0430\u043c\u0438, \u0430 \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u044b\u0439 \u0444\u0430\u043a\u0442\u043e\u0440 \u0434\u043b\u044f \u0434\u0430\u0442\u0430-\u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432. \u041f\u0440\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043e\u0447\u0438\u0441\u0442\u043a\u0430, \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f, Polars \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u044d\u0442\u0438\u043c\u0438 \u0437\u0430\u0434\u0430\u0447\u0430\u043c\u0438 \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u0434\u0430\u0436\u0435 Pandas \u0432\u0435\u0440\u0441\u0438\u0438 2.0.<\/p>\n<h2>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u2014 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0438<\/h2>\n<h3>\u0410\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u044f<\/h3>\n<p>\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0430\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u0438 \u0432 Polars <a href=\"https:\/\/www.statology.org\/pandas-vs-polars-performance-benchmarks-for-common-data-operations\/\">\u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u0441\u0442\u0432\u043e<\/a> \u043f\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 Pandas. \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f Covertype \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 scikit-learn, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u044b\u043b\u043e 581\u00a0012 \u0441\u0442\u0440\u043e\u043a \u0438 54 \u0441\u0442\u043e\u043b\u0431\u0446\u0430. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0430\u0441\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u0445 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432.<\/p>\n<details class=\"spoiler\">\n<summary>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"css\"># Pandas start_time = time.time() mean_pandas = df_pandas.drop('target', axis=1).mean() pandas_time = time.time() - start_time  # Polars start_time = time.time() mean_polars = df_polars.select(pl.all().exclude('target')).mean() polars_time = time.time() - start_time  print(f\"Pandas aggregation time: {pandas_time:.4f} seconds\") print(f\"Polars aggregation time: {polars_time:.4f} seconds\") print(f\"Polars is {pandas_time\/polars_time:.2f}x faster than Pandas\")<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438, \u0447\u0442\u043e Polars \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u0430\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u0438 \u0437\u0430 0,0083 \u0441\u0435\u043a., \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a Pandas \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c 0,1863 \u0441\u0435\u043a. \u0417\u043d\u0430\u0447\u0438\u0442, Polars \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0435\u043c \u0432 22 \u0440\u0430\u0437\u0430 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 Pandas.<\/p>\n<p>\u0422\u0430\u043a\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u044e\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Polars \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Rust, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043e\u0431\u044a\u0435\u043c\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h3>\u0421\u043b\u0438\u044f\u043d\u0438\u0435, \u0438\u043b\u0438 join<\/h3>\n<p>\u0422\u043e\u0442 \u0436\u0435 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 <a href=\"https:\/\/www.statology.org\/pandas-vs-polars-performance-benchmarks-for-common-data-operations\/\">\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f<\/a> \u0438 \u0434\u043b\u044f \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0430 \u043f\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438, \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0432 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0430\u0441\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f, \u0433\u0434\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u0441\u0442\u043e\u043b\u0431\u0446\u0435 &#8216;feature_0&#8217; \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u043b\u043e \u0441\u0440\u0435\u0434\u043d\u0435\u0435.<\/p>\n<details class=\"spoiler\">\n<summary>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"css\"># Pandas start_time = time.time() filtered_pandas = df_pandas[df_pandas['feature_0'] &gt; df_pandas['feature_0'].mean()] pandas_time = time.time() - start_time  # Polars start_time = time.time() filtered_polars = df_polars.filter(pl.col('feature_0') &gt; pl.col('feature_0').mean()) polars_time = time.time() - start_time  print(f\"Pandas filtering time: {pandas_time:.4f} seconds\") print(f\"Polars filtering time: {polars_time:.4f} seconds\") print(f\"Polars is {pandas_time\/polars_time:.2f}x faster than Pandas\") <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438, \u0447\u0442\u043e Polars \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u0437\u0430 0,0183 \u0441\u0435\u043a., \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a Pandas \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c 0,0741 \u0441\u0435\u043a. \u0422\u043e \u0435\u0441\u0442\u044c Polars \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432 \u0447\u0435\u0442\u044b\u0440\u0435 \u0440\u0430\u0437\u0430 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 Pandas.<\/p>\n<h3>\u0413\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u0438\u043b\u0438 GroupBy Operation<\/h3>\n<p>\u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f <a href=\"https:\/\/www.statology.org\/pandas-vs-polars-performance-benchmarks-for-common-data-operations\/\">\u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0430\u0441\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438<\/a> \u043f\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0443 &#8216;target&#8217; \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435\u043c \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b.<\/p>\n<details class=\"spoiler\">\n<summary>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"css\"># Pandas start_time = time.time() grouped_pandas = df_pandas.groupby('target').mean() pandas_time = time.time() - start_time  # Polars start_time = time.time() grouped_polars = df_polars.group_by('target').agg(pl.all().exclude('target').mean()) polars_time = time.time() - start_time  print(f\"Pandas groupby time: {pandas_time:.4f} seconds\") print(f\"Polars groupby time: {polars_time:.4f} seconds\") print(f\"Polars is {pandas_time\/polars_time:.2f}x faster than Pandas\")<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438, \u0447\u0442\u043e Polars \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u0437\u0430 0,201 \u0441\u0435\u043a., \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a Pandas \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c 1,100 \u0441\u0435\u043a. Polars \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432 5,5 \u0440\u0430\u0437 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 Pandas.<\/p>\n<h3>\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430, \u0438\u043b\u0438 sorting<\/h3>\n<p>\u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0430\u0441\u044c <a href=\"https:\/\/www.statology.org\/pandas-vs-polars-performance-benchmarks-for-common-data-operations\/\">\u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u043f\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0443 &#8216;Elevation&#8217;<\/a>.<\/p>\n<details class=\"spoiler\">\n<summary>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"css\"># Pandas start_time = time.time() sorted_pandas = df_pandas.sort_values('feature_0', ascending=False) pandas_time = time.time() - start_time  # Polars start_time = time.time() sorted_polars = df_polars.sort('feature_0', descending=True) polars_time = time.time() - start_time  print(f\"Pandas sorting time: {pandas_time:.4f} seconds\") print(f\"Polars sorting time: {polars_time:.4f} seconds\") print(f\"Polars is {pandas_time\/polars_time:.2f}x faster than Pandas\")<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438, \u0447\u0442\u043e Polars \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u0437\u0430 0,0656 \u0441\u0435\u043a., \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a Pandas \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c 0,2027 \u0441\u0435\u043a. Polars \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432 \u0442\u0440\u0438 \u0440\u0430\u0437\u0430 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 Pandas.<\/p>\n<h3>\u0418\u043d\u0436\u0438\u043d\u0438\u0440\u0438\u043d\u0433 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u0438\u043b\u0438 feature engineering<\/h3>\n<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043b\u0430 \u0432 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 Z-\u043e\u0446\u0435\u043d\u043a\u0438 <a href=\"https:\/\/www.statology.org\/pandas-vs-polars-performance-benchmarks-for-common-data-operations\/\">\u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0441\u0442\u043e\u043b\u0431\u0446\u0435 &#8216;feature_0&#8217;<\/a>. \u042d\u0442\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435.<\/p>\n<details class=\"spoiler\">\n<summary>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"css\"># Pandas start_time = time.time() pandas_zscore = df_pandas.copy() for column in pandas_zscore.columns[:-1]:  # Exclude the target column     pandas_zscore[f'{column}_zscore'] = (pandas_zscore[column] - pandas_zscore[column].mean()) \/ pandas_zscore[column].std() pandas_time = time.time() - start_time  # Polars start_time = time.time() feature_cols = [f'feature_{i}' for i in range(54)] polars_zscore = df_polars.with_columns([     ((pl.col(col) - pl.col(col).mean()) \/ pl.col(col).std()).alias(f'{col}_zscore')     for col in feature_cols ]) polars_time = time.time() - start_time  print(f\"Pandas z-score calculation time: {pandas_time:.4f} seconds\") print(f\"Polars z-score calculation time: {polars_time:.4f} seconds\") print(f\"Polars is {pandas_time\/polars_time:.2f}x faster than Pandas\") <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438, \u0447\u0442\u043e Polars \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 Z-\u043e\u0446\u0435\u043d\u043a\u0438 \u0434\u043b\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0430 0,0919 \u0441\u0435\u043a., \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a Pandas \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c 0,5154 \u0441\u0435\u043a. \u0412\u044b\u0432\u043e\u0434 \u2014 Polars \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432 5,6 \u0440\u0430\u0437\u0430 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 Pandas.<\/p>\n<h2>\u041f\u043e\u0447\u0435\u043c\u0443 Polars \u0431\u044b\u0441\u0442\u0440\u0435\u0435<\/h2>\n<p>\u0423 Pandas \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u044e\u0449\u0438\u043c\u0438 \u043e\u0431\u044a\u0435\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438. \u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0431\u0430\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 NumPy \u2014\u00a0\u044d\u0442\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u043c\u0435\u0449\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u044c \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430. \u0414\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043d\u0430\u0431\u043e\u0440\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a Dask.<\/p>\n<p>Polars \u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430 Rust \u2014 \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043b\u0430\u0432\u0438\u0442\u0441\u044f \u0441\u0432\u043e\u0435\u0439 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e. Rust \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u0438 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0433\u043e\u043d\u043a\u0438. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435 Polars \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439:<\/p>\n<ul>\n<li>\n<p><strong>Arrow Columnar Format<\/strong> \u2014 \u0444\u043e\u0440\u043c\u0430\u0442 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430. \u0414\u0430\u043d\u043d\u044b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u043a\u043e\u043b\u043e\u043d\u043a\u0430\u0445, \u0442\u0430\u043a \u0447\u0442\u043e \u0447\u0442\u0435\u043d\u0438\u0435 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>Lazy Execution<\/strong> \u2014 \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043b\u0430\u043d \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043b\u0438\u0448\u043d\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>\u041c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c<\/strong> \u2014 Polars \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u0441\u0435 \u044f\u0434\u0440\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u0434\u0430\u0447.<\/p>\n<\/li>\n<li>\n<p><strong>Memory Mapping<\/strong> \u2014 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0441 \u0434\u0438\u0441\u043a\u0430, \u043d\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044f \u0432\u0435\u0441\u044c \u043e\u0431\u044a\u0435\u043c \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c.<\/p>\n<\/li>\n<\/ul>\n<p>\u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f API, \u0442\u043e \u0443<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-443650","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/443650","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=443650"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/443650\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=443650"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=443650"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=443650"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}