René's URL Explorer Experiment


Title: Pandas、Numpy性能优化秘籍(全) · Issue #48 · aialgorithm/Blog · GitHub

Open Graph Title: Pandas、Numpy性能优化秘籍(全) · Issue #48 · aialgorithm/Blog

X Title: Pandas、Numpy性能优化秘籍(全) · Issue #48 · aialgorithm/Blog

Description: pandas、numpy是Python数据科学中非常常用的库,numpy是Python的数值计算扩展,专门用来处理矩阵,它的运算效率比列表更高效。pandas是基于numpy的数据处理工具,能更方便的操作大型表格类型的数据集。 但是,随着数据量的剧增,有时numpy和pandas的速度就成瓶颈。如下我们会介绍一些优化秘籍:里面包含 代码上面的优化,以及可以无脑使用的性能优化扩展包。 1、NumExpr NumExpr 是一个对NumPy计算式进行的性能优化。NumExp...

Open Graph Description: pandas、numpy是Python数据科学中非常常用的库,numpy是Python的数值计算扩展,专门用来处理矩阵,它的运算效率比列表更高效。pandas是基于numpy的数据处理工具,能更方便的操作大型表格类型的数据集。 但是,随着数据量的剧增,有时numpy和pandas的速度就成瓶颈。如下我们会介绍一些优化秘籍:里面包含 代码上面的优化,以及可以无脑使用的性能优化扩展包。 1、Nu...

X Description: pandas、numpy是Python数据科学中非常常用的库,numpy是Python的数值计算扩展,专门用来处理矩阵,它的运算效率比列表更高效。pandas是基于numpy的数据处理工具,能更方便的操作大型表格类型的数据集。 但是,随着数据量的剧增,有时numpy和pandas的速度就成瓶颈。如下我们会介绍一些优化秘籍:里面包含 代码上面的优化,以及可以无脑使用的性能优化扩展包。 1、Nu...

Opengraph URL: https://github.com/aialgorithm/Blog/issues/48

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Pandas、Numpy性能优化秘籍(全)","articleBody":"pandas、numpy是Python数据科学中非常常用的库,numpy是Python的数值计算扩展,专门用来处理矩阵,它的运算效率比列表更高效。pandas是基于numpy的数据处理工具,能更方便的操作大型表格类型的数据集。\r\n\r\n但是,随着数据量的剧增,有时numpy和pandas的速度就成瓶颈。如下我们会介绍一些优化秘籍:里面包含 代码上面的优化,以及可以无脑使用的性能优化扩展包。\r\n\r\n### 1、NumExpr\r\nNumExpr 是一个对NumPy计算式进行的性能优化。NumExpr的使用及其简单,只需要将原来的numpy语句使用双引号框起来,并使用numexpr中的evaluate方法调用即可。经验上看,数据有上万条+ 使用NumExpr才比较优效果,对于简单运算使用NumExpr可能会更慢。如下较复杂计算,速度差不多快了5倍。\r\n```\r\nimport numexpr as ne\r\n\r\nimport numpy as np\r\n\r\na = np.linspace(0,1000,1000) \r\n\r\nprint('# numpy十次幂计算')\r\n%timeit a**10\r\n\r\nprint('# numexpr十次幂计算')\r\n%timeit ne.evaluate('a**10')\r\n```\r\n![](https://upload-images.jianshu.io/upload_images/11682271-95211d181e0182b2.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\n\r\n### 2、Numba\r\nNumba 使用行业标准的[LLVM](https://llvm.org/)编译器库在运行时将 Python 函数转换为优化的机器代码。Python 中 Numba 编译的数值算法可以接近 C 或 FORTRAN 的速度。\r\n![](https://upload-images.jianshu.io/upload_images/11682271-90667f129d99790c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\n\r\n如果在你的数据处理过程涉及到了大量的数值计算,那么使用numba可以大大加快代码的运行效率(一般来说,Numba 引擎在处理大量数据点 如 1 百万+ 时表现出色)。numba使用起来也很简单,因为numba内置的函数本身是个装饰器,所以只要在自己定义好的函数前面加个@nb.方法就行,简单快捷!\r\n\r\n```\r\n# pip install numba\r\n\r\nimport numba as nb\r\n\r\n# 用numba加速的求和函数\r\n@nb.jit()\r\ndef nb_sum(a):\r\n    Sum = 0\r\n    for i in range(len(a)):\r\n        Sum += a[i]\r\n    return Sum\r\n\r\n# 没用numba加速的求和函数\r\ndef py_sum(a):\r\n    Sum = 0\r\n    for i in range(len(a)):\r\n        Sum += a[i]\r\n    return Sum\r\n\r\nimport numpy as np\r\na = np.linspace(0,1000,1000) # 创建一个长度为1000的数组\r\nprint('# python求和函数')\r\n%timeit sum(a) \r\nprint('# 没加速的for循环求和函数')\r\n%timeit py_sum(a)\r\nprint('# numba加速的for循环求和函数')\r\n%timeit nb_sum(a) \r\nprint('# numpy求和函数')\r\n%timeit np.sum(a) \r\n\r\n```\r\n![](https://upload-images.jianshu.io/upload_images/11682271-541330c9b62fdf7f.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\n当前示例可以看出,numba甚至比号称最接近C语言速度运行的numpy还要快5倍+,对于python求和速度快了几百倍。。\r\n\r\n此外,Numba还支持GPU加速、矢量化加速方法,可以进一步达到更高的性能。\r\n\r\n```\r\nfrom numba import cuda\r\ncuda.select_device(1)\r\n\r\n@cuda.jit\r\ndef CudaSquare(x):\r\n    i, j = cuda.grid(2)\r\n    x[i][j] *= x[i][j]\r\n\r\n\r\n#numba的矢量化加速\r\nfrom math import sin\r\n@nb.vectorize()\r\ndef nb_vec_sin(a):\r\n    return sin(a)\r\n```\r\n\r\n\r\n### 3、CuPy\r\nCuPy 是一个借助 CUDA GPU 库在英伟达 GPU 上实现 Numpy 数组的库。基于 Numpy 数组的实现,GPU 自身具有的多个 CUDA 核心可以促成更好的并行加速。\r\n```\r\n# pip install cupy\r\nimport numpy as np\r\nimport cupy as cp\r\nimport time\r\n\r\n### numpy\r\ns = time.time()\r\nx_cpu = np.ones((1000,1000,1000))\r\ne = time.time()\r\nprint(e - s)\r\n\r\n### CuPy \r\ns = time.time()\r\nx_gpu = cp.ones((1000,1000,1000))\r\ne = time.time()\r\nprint(e - s)\r\n```\r\n上述代码,Numpy 创建(1000, 1000, 1000)的数组用了 1.68 秒,而 CuPy 仅用了 0.16 秒,实现了 10.5 倍的加速。随着数据量的猛增,CuPy的性能提升会更为明显。\r\n\r\n### 4、pandas使用技巧\r\n```更多pandas性能提升技巧请戳官方文档:https://pandas.pydata.org/pandas-docs/stable/user_guide/enhancingperf.html```\r\n#### 4.1 按行迭代优化\r\n我们按行对dataframe进行迭代,一般我们会用iterrows这个函数。在新版的pandas中,提供了一个更快的itertuples函数,如下可以看到速度快了几十倍。\r\n```\r\nimport pandas as pd\r\nimport numpy as np\r\nimport time\r\ndf = pd.DataFrame({'a': np.random.randn(100000),\r\n                     'b': np.random.randn(100000),\r\n                    'N': np.random.randint(100, 1000, (100000)),\r\n                   'x':  np.random.randint(1, 10, (100000))})\r\n\r\n%%timeit\r\na2=[]\r\nfor row in df.itertuples():\r\n    temp=getattr(row, 'a')\r\n    a2.append(temp*temp)\r\ndf['a2']=a2\r\n%%timeit\r\na2=[]\r\nfor index,row in df.iterrows():\r\n    temp=row['a']\r\n    a2.append(temp*temp)\r\ndf['a2']=a2    \r\n\r\n\r\n```\r\n![](https://upload-images.jianshu.io/upload_images/11682271-7df960fa8d445e62.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\n#### 4.2 apply、applymap优化\r\n当对于每行执行类似的操作时,用循环逐行处理效率很低。这时可以用apply或applymap搭配函数操作,其中apply是可用于逐行计算,而applymap可以做更细粒度的逐个元素的计算。\r\n```\r\n# 列a、列b逐行进行某一函数计算\r\ndf['a3']=df.apply( lambda row: row['a']*row['b'],axis=1)\r\n# 逐个元素保留两位小数\r\ndf.applymap(lambda x: \"%.2f\" % x)\r\n```\r\n![](https://upload-images.jianshu.io/upload_images/11682271-913adb3186c32fd0.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\n#### 4.3 聚合函数agg优化\r\n\r\n对于某列将进行聚合后,使用内置的函数比自定义函数效率更高,如下示例速度加速3倍\r\n```\r\n%timeit  df.groupby(\"x\")['a'].agg(lambda x:x.sum())\r\n\r\n%timeit  df.groupby(\"x\")['a'].agg(sum)\r\n\r\n%timeit  df.groupby(\"x\")['a'].agg(np.sum)\r\n```\r\n![](https://upload-images.jianshu.io/upload_images/11682271-a7e8e0c2793236f3.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\n\r\n#### 4.4 文件操作\r\npandas读取文件,pkl格式的数据的读取速度最快,其次是hdf格式的数据,再者是读取csv格式数据,而xlsx的读取是比较慢的。但是存取csv有个好处是,这个数据格式通用性更好,占用内存硬盘资源也比较少。此外,对于大文件,csv还可以对文件分块、选定某几列、指定数据类型做读取。\r\n![](https://upload-images.jianshu.io/upload_images/11682271-eea0f267fe951707.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\n#### 4.5 pandas.eval\r\npandas.eval 是基于第一节提到的numexpr,pandas也是基于numpy开发的,numexpr同样可以被用来对pandas加速)。使用eval表达式的一个经验是数据超过 10,000 行的情况下使用会有明显优化效果。\r\n```\r\nimport pandas as pd \r\nnrows, ncols = 20000, 100\r\ndf1, df2, df3, df4 = [pd.DataFrame(np.random.randn(nrows, ncols)) for _ in range(4)]\r\n\r\nprint('pd')\r\n%timeit df1 + df2 + df3 + df4\r\nprint('pd.eval')\r\n%timeit pd.eval(\"df1 + df2 + df3 + df4\")\r\n```\r\n![](https://upload-images.jianshu.io/upload_images/11682271-3c4a1d061eade433.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\n\r\n### 5、Cython优化\r\nCython是一个基于C语言的Python 编译器,在一些计算量大的程序中,可以Cython来实现相当大的加速。考虑大部分人可能都不太了解复杂的cython语句,下面介绍下Cython的简易版使用技巧。通过在Ipython加入 Cython 魔术函数`%load_ext Cython`,如下示例就可以加速了一倍。进一步再借助更高级的cython语句,还是可以比Python快个几十上百倍。\r\n\r\n```\r\n%%cython\r\ndef f_plain(x):\r\n    return x * (x - 1)\r\ndef integrate_f_plain(a, b, N):\r\n    s = 0\r\n    dx = (b - a) / N\r\n    for i in range(N):\r\n        s += f_plain(a + i * dx)\r\n    return s * dx\r\n```\r\n![](https://upload-images.jianshu.io/upload_images/11682271-326baa7efe18d4af.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\n\r\n\r\n\r\n\r\n### 6、swifter\r\nswifter是pandas的插件,可以直接在pandas的数据上操作。Swifter的优化方法检验计算是否可以矢量化或者并行化处理,以提高性能。如常见的apply就可以通过swifter并行处理。\r\n```\r\nimport pandas as pd\r\nimport swifter\r\n\r\ndf.swifter.apply(lambda x: x.sum() - x.min())\r\n```\r\n\r\n### 7、Modin\r\nModin后端使用dask或者ray(dask是类似pandas库的功能,可以实现并行读取运行),是个支持分布式运行的类pandas库,简单通过更改一行代码`import modin.pandas as pd`就可以优化 pandas,常用的内置的read_csv、concat、apply都有不错的加速。注:并行处理的开销会使小数据集的处理速度变慢。\r\n![](https://upload-images.jianshu.io/upload_images/11682271-e8b9bc22f2b599c5.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\n```\r\n!pip install modin\r\nimport pandas\r\nimport modin.pandas as pd\r\nimport time\r\n\r\n## pandas\r\n\r\npandas_df = pandas.DataFrame({'a': np.random.randn(10000000),\r\n                     'b': np.random.randn(10000000),\r\n                    'N': np.random.randint(100, 10000, (10000000)),\r\n                   'x':  np.random.randint(1, 1000, (10000000))})\r\n\r\n\r\n\r\nstart = time.time()\r\n\r\nbig_pandas_df = pandas.concat([pandas_df for _ in range(25)])\r\n\r\nend = time.time()\r\npandas_duration = end - start\r\nprint(\"Time to concat with pandas: {} seconds\".format(round(pandas_duration, 3)))\r\n\r\n#### modin.pandas\r\nmodin_df = pd.DataFrame({'a': np.random.randn(10000000),\r\n                     'b': np.random.randn(10000000),\r\n                    'N': np.random.randint(100, 10000, (10000000)),\r\n                   'x':  np.random.randint(1, 1000, (10000000))})\r\n\r\nstart = time.time()\r\nbig_modin_df = pd.concat([modin_df for _ in range(25)])\r\n\r\nend = time.time()\r\nmodin_duration = end - start\r\nprint(\"Time to concat with Modin: {} seconds\".format(round(modin_duration, 3)))\r\n\r\nprint(\"Modin is {}x faster than pandas at `concat`!\".format(round(pandas_duration / modin_duration, 2)))\r\n```\r\n![](https://upload-images.jianshu.io/upload_images/11682271-ae81fa6f4db8d7ab.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\n\r\n(END)\r\n---\r\n文章首发公众号“算法进阶”,欢迎关注。公众号阅读原文可访问文章[相关代码及资料](https://github.com/aialgorithm/Blog)","author":{"url":"https://github.com/aialgorithm","@type":"Person","name":"aialgorithm"},"datePublished":"2022-04-12T06:51:56.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/48/Blog/issues/48"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:0b31194c-f613-0813-c4e4-4804c634fa04
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id93D0:36DBB6:4771CD:648DA5:696A21DA
html-safe-nonce007c9871e6f37c5c9442f87c152d9db46e89e840eb9d1c194d56f988e0dfd71c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5M0QwOjM2REJCNjo0NzcxQ0Q6NjQ4REE1OjY5NkEyMURBIiwidmlzaXRvcl9pZCI6IjExMzI0MDM0NzI2NDQ4NDE5NDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacc7b1f5a1d54101389877574a8fd3cb28de0c47f78e1cdb5c5518d737d90aab49
hovercard-subject-tagissue:1201225687
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/aialgorithm/Blog/48/issue_layout
twitter:imagehttps://opengraph.githubassets.com/ec3e90037c7bfc21c24dbea5e1e4935614993c8d4427b325e51da468f78e918f/aialgorithm/Blog/issues/48
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ec3e90037c7bfc21c24dbea5e1e4935614993c8d4427b325e51da468f78e918f/aialgorithm/Blog/issues/48
og:image:altpandas、numpy是Python数据科学中非常常用的库,numpy是Python的数值计算扩展,专门用来处理矩阵,它的运算效率比列表更高效。pandas是基于numpy的数据处理工具,能更方便的操作大型表格类型的数据集。 但是,随着数据量的剧增,有时numpy和pandas的速度就成瓶颈。如下我们会介绍一些优化秘籍:里面包含 代码上面的优化,以及可以无脑使用的性能优化扩展包。 1、Nu...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameaialgorithm
hostnamegithub.com
expected-hostnamegithub.com
None014f3d193f36b7d393f88ca22d06fbacd370800b40a547c1ea67291e02dc8ea3
turbo-cache-controlno-preview
go-importgithub.com/aialgorithm/Blog git https://github.com/aialgorithm/Blog.git
octolytics-dimension-user_id33707637
octolytics-dimension-user_loginaialgorithm
octolytics-dimension-repository_id147093233
octolytics-dimension-repository_nwoaialgorithm/Blog
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id147093233
octolytics-dimension-repository_network_root_nwoaialgorithm/Blog
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
released515f6f09fa57a93bf90355cb894eb84ca4f458f
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/aialgorithm/Blog/issues/48#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Faialgorithm%2FBlog%2Fissues%2F48
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Faialgorithm%2FBlog%2Fissues%2F48
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=aialgorithm%2FBlog
Reloadhttps://github.com/aialgorithm/Blog/issues/48
Reloadhttps://github.com/aialgorithm/Blog/issues/48
Reloadhttps://github.com/aialgorithm/Blog/issues/48
aialgorithm https://github.com/aialgorithm
Bloghttps://github.com/aialgorithm/Blog
Notifications https://github.com/login?return_to=%2Faialgorithm%2FBlog
Fork 259 https://github.com/login?return_to=%2Faialgorithm%2FBlog
Star 942 https://github.com/login?return_to=%2Faialgorithm%2FBlog
Code https://github.com/aialgorithm/Blog
Issues 66 https://github.com/aialgorithm/Blog/issues
Pull requests 0 https://github.com/aialgorithm/Blog/pulls
Actions https://github.com/aialgorithm/Blog/actions
Projects 0 https://github.com/aialgorithm/Blog/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/aialgorithm/Blog/security
Please reload this pagehttps://github.com/aialgorithm/Blog/issues/48
Insights https://github.com/aialgorithm/Blog/pulse
Code https://github.com/aialgorithm/Blog
Issues https://github.com/aialgorithm/Blog/issues
Pull requests https://github.com/aialgorithm/Blog/pulls
Actions https://github.com/aialgorithm/Blog/actions
Projects https://github.com/aialgorithm/Blog/projects
Security https://github.com/aialgorithm/Blog/security
Insights https://github.com/aialgorithm/Blog/pulse
New issuehttps://github.com/login?return_to=https://github.com/aialgorithm/Blog/issues/48
New issuehttps://github.com/login?return_to=https://github.com/aialgorithm/Blog/issues/48
Pandas、Numpy性能优化秘籍(全)https://github.com/aialgorithm/Blog/issues/48#top
https://github.com/aialgorithm
https://github.com/aialgorithm
aialgorithmhttps://github.com/aialgorithm
on Apr 12, 2022https://github.com/aialgorithm/Blog/issues/48#issue-1201225687
https://camo.githubusercontent.com/de0aa3628f4c5487a5c1054ea3119951b4cf1646fd97c822ed787eeeb3871ae3/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d393532313164313831653031383262322e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
LLVMhttps://llvm.org/
https://camo.githubusercontent.com/0a7606a6ce2240db2bbd7b5c284f06ad6205378c91535fe4f2e97c04d82acecf/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d393036363766313239643939373930632e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
@nbhttps://github.com/nb
https://camo.githubusercontent.com/a521c523ce10cacebe691ec5d2bc60e57deec4f329ec90c01bf6a4ac597dadd6/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d353431333330633962363266646637662e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
https://camo.githubusercontent.com/d6c83a04dbe21cd7558ed994f226da20d3c56b89e7a2a749e83a325f5b9d68c5/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d376466393630666138643434356536322e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
https://camo.githubusercontent.com/2298adfd806d3bfe0946014bbafa7e01e1fefdec780d20db51dd71eb6171f5d4/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d393133616462333138366333326664302e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
https://camo.githubusercontent.com/4425898130020681387acc2b5b0dc6d2f4ebca1d66e964951918627809446a14/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d613765386530633237393332333666332e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
https://camo.githubusercontent.com/d0ee29397b7973044eaf70f612db696c441e63a15a332c1f8841c2e6bc669d9d/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d656561306632363766653935313730372e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
https://camo.githubusercontent.com/8894aa81f450863f4e5242451662bcf66509283b663d1cd6d1a447be65dc0194/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d336334613164303631656164653433332e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
https://camo.githubusercontent.com/7eb466a5dd76283847eb6f5c4bf988fcbc5c13f9ae1faed9babdd96188842ee3/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d333236626161376566653138643461662e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
https://camo.githubusercontent.com/74abb3776ce5f4f6add759e7f7af100b5231fb1e2235dfc8a537e577c0dbacdd/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d653862396263323266326235393963352e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
https://camo.githubusercontent.com/34dd35b1cd14bdf42145f9905e6d35d8bbc9f7871eb86d5019601f356493cb0a/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d616538316661366634646238643761622e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
相关代码及资料https://github.com/aialgorithm/Blog
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.