We're sunsetting PodQuest on 2025-07-28. Thank you for your support!
Export Podcast Subscriptions
cover of episode 885: Python Polars: The Definitive Guide, with Jeroen Janssens and Thijs Nieuwdorp

885: Python Polars: The Definitive Guide, with Jeroen Janssens and Thijs Nieuwdorp

2025/5/6
logo of podcast Super Data Science: ML & AI Podcast with Jon Krohn

Super Data Science: ML & AI Podcast with Jon Krohn

AI Deep Dive Transcript
People
J
Jeroen Janssens
T
Thijs Nieuwdorp
Topics
Jeroen Janssens: 我在工作中偶然发现了Polars,并被它强大的性能和简洁的语法所吸引。我意识到Polars是一个非常有潜力的库,值得出一本书来介绍它。在写作过程中,我发现Polars的优势在于其高效的计算速度和对内存的有效利用,这使得它在处理大型数据集时具有显著的优势。此外,Polars的声明式编程风格也使得代码更易于阅读和维护。与Thijs合作编写这本书,我们能够互相补充,共同完成这项工作。我们也从实际项目中学习到了很多,并将这些经验融入到了书中。 在与Alliander的合作项目中,我们成功地将Polars应用于生产环境,并取得了显著的成果。通过将Pandas代码转换为Polars代码,我们成功地将内存使用量从500GB减少到40GB,并将处理速度提高了一倍。这充分证明了Polars在实际应用中的价值。 此外,我们还探索了Polars的数据可视化功能,并发现Great Tables包可以有效地对数据表格进行样式化,而无需修改底层数据。这使得我们可以创建更美观、更易于理解的数据可视化图表。 在与NVIDIA和Dell的合作中,我们对Polars的GPU加速性能进行了基准测试,结果表明Polars在GPU上的运行速度比在CPU上快得多。这进一步扩展了Polars的应用范围,使其能够处理更大规模的数据集。 Thijs Nieuwdorp: 我与Jeroen的写作风格互补,他擅长润色,我擅长起草。在写作过程中,我们不断学习和完善,并从实际项目中汲取经验。 在Alliander项目中,我们面临着处理大型数据集的挑战。通过使用Polars,我们成功地解决了这个问题,并显著提高了数据处理效率。Polars的优化器和引擎使得我们可以高效地处理数据,而无需过多关注底层细节。 在包管理方面,我们从Poetry转向了UV,因为它更快、更可靠、更容易使用。UV基于Rust,其性能优势显著,这使得我们可以快速地设置和拆卸环境,从而方便地进行基准测试。 在数据可视化方面,我们使用了Great Tables包,它可以有效地对数据表格进行样式化,而无需修改底层数据。这使得我们可以创建更美观、更易于理解的数据可视化图表。 与NVIDIA和Dell的合作,我们对Polars的GPU加速性能进行了基准测试,结果表明Polars在GPU上的运行速度比在CPU上快得多。这进一步扩展了Polars的应用范围,使其能够处理更大规模的数据集。

Deep Dive

Shownotes Transcript

Jeroen Janssens and Thijs Nieuwdorp are data frame library Polars’ greatest advocates in this episode with Jon Krohn, where they discuss their book, Python Polars: The Definitive Guide, best practice for using Polars, why Pandas users are switching to Polars for data frame operations in Python, and how the library reduces memory usage and compute time up to 10x more than Pandas. Listen to the episode to be a part of an O’Reilly giveaway!

Additional materials: ⁠www.superdatascience.com/885)

This episode is brought to you by Trainium2, the latest AI chip from AWS), by Adverity, the conversational analytics platform) and by the Dell AI Factory with NVIDIA).

Interested in sponsoring a SuperDataScience Podcast episode? Email [email protected] for sponsorship information.

In this episode you will learn:

-

(07:44) Why Jeroen and Thijs wrote Python Polars: The Definitive Guide  

-

(21:54) Best practices in Polars 

-

(25:55) Why Polars has so many users

-

(34:32) The benefits of the Great Tables package

-

(51:06) Jeroen and Thijs’ partnership with NVIDIA and Dell for Python Polars: The Definitive Guide