Are you doing data science? Statistics? No?

Then for god’s sake don’t use pandas, you just look dumb af when you pull several MB of a package just to load csv. If you find yourself doing that, just stop programming and look for another job

Thanks for attention

1 point

Pandas is more efficient than Python at operating on large datasets. Can you suggest alternarives?

permalink
report
reply
1 point
Deleted by creator
permalink
report
parent
reply
2 points

Wait what, people are loading data from csv in their websites?

permalink
report
reply
2 points

Makes sense if you want to give the user the ability to import data from csv (see django import export package). Beyond importing data from user or another service i dont see other uses, but they do exist.

permalink
report
parent
reply
5 points

For those that don’t know, the standard library includes a csv package so you can just import csv.

Documented at https://docs.python.org/3/library/csv.html

permalink
report
reply
5 points

I use DictReader all the time, along with a library to hande the type detection. This is the way to go, especially if you need to process line by line or filter columns and rows out first.

Regardless, I’ll avoid pandas wherever I can. It’s not something I want in production level code if I can help it.

permalink
report
parent
reply
27 points

If you find yourself doing that, just stop programming and look for another job

I don’t think that is an appropriate response to someone misunderstanding a package. Just educate them in a kind and respectful manner and they’ll learn.

permalink
report
reply
2 points

fair enough.

permalink
report
parent
reply

Python

!python@programming.dev

Create post

Welcome to the Python community on the programming.dev Lemmy instance!

📅 Events
Past

November 2023

October 2023

July 2023

August 2023

September 2023

🐍 Python project:
💓 Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
  • Pythörhead: a Python library for interacting with Lemmy
  • Plemmy: a Python package for accessing the Lemmy API
  • pylemmy pylemmy enables simple access to Lemmy’s API with Python
  • mastodon.py, a Python wrapper for the Mastodon API
Feeds

Community stats

  • 732

    Monthly active users

  • 468

    Posts

  • 2.4K

    Comments