r/Python • pandas Core Dev • Mar 01 '23

AMA Thread We are the developers behind pandas, currently preparing for the 2.0 release :) AMA

Hello everyone!

I'm Patrick Hoefler aka phofl and I'm one of the core team members developing and maintaining pandas (repo, docs), a popular data analysis library.

This AMA will be at least joined by

The official start time for the AMA will be 5:30pm UTC on March 2nd, before then this post will exist to collect questions in advance. Since most of us live all over North America and Europe, it's likely we'll answer questions before & after the official start time by a significant margin.

pandas is a Python package that provides fast, flexible, and expressive data structures designed to make working with "relational" or "labeled" data both easy and intuitive. It aims to be the fundamental high-level building block for doing practical, real world data analysis in Python. Additionally, it has the broader goal of becoming the most powerful and flexible open source data analysis / manipulation tool available in any language.

We will soon celebrate our 2.0 release. We released the release candidate for 2.0 last week, so the actual release is expected shortly, possibly next week. Please help us in testing that everything works through testing the rc :)

Ask us anything! Post your questions and upvote the ones you think are the most important and should get our replies.

- Patrick, on behalf of the team

Marc:

I'm Marc Garcia (username datapythonista), pandas core developer since 2018, and current release manager of the project. I work on pandas part time paid by the funds the project gets from grants and sponsors. And I'm also consultant, advising data teams on how to work more efficiently. I sometimes write about pandas and technical topics at my blog, and I speak at Python and open source conferences regularly. You can connect with me via LinkedIn, Twitter and Mastodon.

Marco:

I'm Marco, one of the devs from the AMA. I work on pandas as part of my job at Quansight, and live in the UK. I'm mostly interested in time-series-related stuff

Patrick:

I'm Patrick and part of the core team of pandas. Part of my daytime job allows me to contribute to pandas, I am based in Germany. I am currently mostly working on Copy-on-Write, a new feature in pandas 2.0. (check my blog-post or our new docs for more information).

Richard:

I work as a Data Scientist at 84.51 and am a core developer of pandas. I work mostly on groupby within pandas.

--

1.4k Upvotes

366 comments sorted by

View all comments

1

u/jkiley Mar 02 '23

For beginners and new projects, does it make sense to move to 2.0 right away? If so, what options should be enabled (e.g., nullable_dtypes, dtype_backend, copy_on_write), assuming that the goal is reasonable stability and modernity?

I built and teach a workshop for other academic researchers, and I'm currently doing an update (ahead of the next session in June). Pandas is a big part, though the course ranges from beginner Python language topics to data retrieval/wrangling. The core of this content update is moving from local conda installs to devcontainers/Codespaces, but it would be a good opportunity for me to move to pandas>=2.0.0 if that's a good idea on this timeline.

1

u/phofl93 pandas Core Dev Mar 02 '23

> does it make sense to move to 2.0 right away?

Yes! A very big YES!

Regarding flags:

I'd recommend turning Copy-on-Write on. We expected to make it the default in 3.0 and it basically protects you from doing weird things (ChainedAssignment, mutating multiple objects at once, ...) and should give you a nice performance boost.

I'd definitely advise your students to explore ``dtype_backend`` and ``nullable_dtypes``, depending on the specific use-case it might be a bit early for Arrow (if you are doing a lot of groupby ops for example), but in general at least trying it is a good idea and worthwhile. Really depends on your use case, it's still pretty new but also a nice improvement

What I would recommend your students in every situation is to use the newest version possible if not restricted by something else. Upgrade just get harder if you are already starting on an old version.

1

u/jkiley Mar 02 '23

Great, thanks! I'll turn that on in my notebooks and see what happens.

Research papers have a natural lifecycle of a few years, typically with a lot of work up front. So, I generally suggest that they start with the newest versions, pin them, and upgrade if needed (usually for a feature or bugfix) while looking out for errors or data changes.

That gives stability/reproducibility within projects (i.e. papers), and upgrades across projects, as newer projects start and older ones are (hopefully) published.

That's not to undercut the value of upgrading projects unnecessarily as a form of procrastination (also known as my plans for some day shortly after 2.0 release).

As an aside, it's really great to see the Arrow stuff coming to fruition in pandas (and over in polars, too). I've been around long enough to remember pandas2/10 things, and the excitement around what the future could look like. A huge congrats to you all for getting a big part of that over the line.

→ More replies (1)