Loading Data into Pandas: Tips and Tricks You May or May Not Know
1–10 of 12 posts
Re: Loading Data into Pandas: Tips and Tricks You May or May Not Know
#2Despite using it for years, I still haven't decided if pandas is poorly architected or if the clunkiness (for lack of better of term) is a result of the inherent difficulty of the tasks.
Re: Loading Data into Pandas: Tips and Tricks You May or May Not Know
#3Some good tips in here, I've find myself reaching for JSON/excel methods often. Despite using it for years, I still haven't decided if pandas is poorly architected or if the clunkiness (for lack of better of term) is a result of the inherent difficulty of the tasks.
Re: Loading Data into Pandas: Tips and Tricks You May or May Not Know
#4https://pandas.pydata.org/docs/reference/api/pandas.read_sql...
Re: Loading Data into Pandas: Tips and Tricks You May or May Not Know
#5Re: Loading Data into Pandas: Tips and Tricks You May or May Not Know
#6https://github.com/capitalone/DataProfiler
The gist is that you can point to any common dataset and load it directly into pandas.
from dataprofiler import Data
data = Data("your_file.csv") # Auto-Detect & Load: CSV, AVRO, Parquet, JSON, Text, URL
I simply hate dealing with loading data, so it's my go-to.
Re: Loading Data into Pandas: Tips and Tricks You May or May Not Know
#7[1]: https://ad.vgiscience.org/twitter-global-preview/00_Twitter_...
Re: Loading Data into Pandas: Tips and Tricks You May or May Not Know
#8It’s much faster because DuckDB is vectorized. The result is a Pandas dataframe.
Querying the Pandas dataframe from DuckDB is faster than querying it with Pandas itself.
Re: Loading Data into Pandas: Tips and Tricks You May or May Not Know
#9Not to taunt about the article, but the most important pandas parameters to me are `iterator=True` and `chunksize=x`, for streamed processing. Here's an example for processing a CSV file with 400 Million latitude and longitude coordinates.[1] [1]: https://ad.vgiscience.org/twitter-global-preview/00_Twitter_...