this post was submitted on 08 Jul 2023
-10 points (36.1% liked)

Python

6360 readers
9 users here now

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

๐Ÿ“… Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

๐Ÿ Python project:
๐Ÿ’“ Python Community:
โœจ Python Ecosystem:
๐ŸŒŒ Fediverse
Communities
Projects
Feeds

founded 1 year ago
MODERATORS
 

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

you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 5 points 1 year ago (1 children)

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

[โ€“] [email protected] 5 points 1 year ago

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.