News for hackers. Stuff that matters.
Re:Comprehensive Guide on Data Visualization with Pandas by whitehouse3 on Monday September 16, 2019 @10:57AM (#20984687)
Lately, `pip install pandas` is my first step after making a new virtual environment. Its read_sql and read_csv methods are magic. The resulting DataFrames are just like DataTables in C#. And for complex joins and aggregations, I can DataFrame.to_sql into an in-memory SQLite database.

Pandas feels like the wrong tool for this job. I don't use multi-indexes or any statistical methods. I don't chart anything.

But it's so darn convenient. If the time comes to optimize I can `import csv` directly and improve performance. But nothing beats it for prototyping.

Are there better options in this space?

Re:Comprehensive Guide on Data Visualization with Pandas by danpelota on Monday September 16, 2019 @11:25AM (#20984984)
On occasion, I've fired up pandas just to sanitize a CSV file and drop malformed rows as preparation to bulk ingesting into a database:

  import pandas as pd
  pd.read_csv('bad_file.csv', error_bad_lines=False).to_csv('good_file.csv')
It's not efficient (reads everything into memory), but read_csv is robust when it comes to handling embedded unescaped quotes/commas/etc., and supports dropping rows with the incorrect number of columns due to anomalies it can't handle.
Re:Comprehensive Guide on Data Visualization with Pandas by maest on Monday September 16, 2019 @11:14AM (#20984878)
Genuine question - would you be willing to spend money for a better version of pandas?

Better in some generic sense of lighter, faster, better API.

I share your implied concern that pandas can be quite large and I personally disagree with a lot of the design decisions when it comes to the pandas API, but building an alternative tool would be a full time job. Unfortunately, there is no mechanism to support Python library developers and the expectation is for Python libraries to be free.

I'm curious how many people would be ok paying for a Python library.

Re:Comprehensive Guide on Data Visualization with Pandas by _coveredInBees on Monday September 16, 2019 @11:26AM (#20984998)
I think that would be an uphill battle and very hard to succeed financially. I agree with you regarding the API being a mess, but pandas is so heavily entrenched in the datascience space (in Python land) that it is almost impossible for a free replacement to take over, let a lone a paid library.
Re:Comprehensive Guide on Data Visualization with Pandas by whitehouse3 on Monday September 16, 2019 @11:31AM (#20985052)
And pandas is valuable particularly because it has so many users. I'd worry that a paid product would stagnate over time, or change to meet the needs of its largest customers, leaving me behind.

I go out of my way to support open source projects. Closed source would be a much harder sell.

Re:Comprehensive Guide on Data Visualization with Pandas by luckydata on Monday September 16, 2019 @12:32PM (#20985796)
I have so many things to say about this but I also want to remind you that Wes is working on pandas 2.

https://dev.pandas.io/pandas2/goals.html

Re:Comprehensive Guide on Data Visualization with Pandas by sireat on Monday September 16, 2019 @03:53PM (#20987920)
Good to know!

I thought that Wes had said a while ago that he was taking a break from working on Pandas

Re:Comprehensive Guide on Data Visualization with Pandas by datascientist on Monday September 16, 2019 @11:46AM (#20985242)
If you need to scale out or speedup pandas, there's Modin https://modin.readthedocs.io/en/latest/ (which uses Ray from)