No I was being accusatory unfairly. I’ve updated my post.
No I was being accusatory unfairly. I’ve updated my post.
First off, understanding the different data structure from a high level is mandatory. I would understand the difference between a dataframe, series, and index are. Further, learn how numpy’s ndarrays play a role.
From there, unfortunately, I had to learn by doing…or rather struggling. It was one question at a time to stack overflow, like “how to filter on a column in pandas”. Maybe in the modern era of LLMs, this part might be easier. And eventually, I learned some patterns and internalized the data structures.
You are correct. For some data sources like parquet it includes some metadata that helps with this, but it’s not as robust at databases I dont think. And of course, cvs have no metadata (I guess a header row.)
The actually specification for how to efficiently store tabular data in memory that also permits quick execution of filtering, pivoting, i.e. all the transformations you need…is called apache arrow. It is the backend of polars and is also a non-default backend of pandas. The complexity of the format I’m unfamiliar with.
I learned SQL before pandas. It’s still tabular data, but the mechanisms to mutate/modify/filter the data are different methodologies. It took a long time to get comfy with pandas. It wasnt until I understood that the way you interact with a database table and a dataframe are very different, that I started to finally get a grasp on pandas.
If it works, don’t fix it!
A big feature of polars is only loading applicable data from disk. But during exporatory data analysis (EDA) you often have the whole dataset in memory. In this case, filters wont help much there. Polars has a good page in their docs about all the possible optimizations it is capable of. https://docs.pola.rs/user-guide/lazy/optimizations/
One I see off the top is projection pushdown, which only selects relevant columns for a final transformations. In pandas, if you perform a group by with aggregation, then only look at a few columns, you still perform aggregation across all the data. In polars lazy API, you would define the entire process upfront, and it would know not to aggregate certain columns, for instance.
Imo Rust already has the perfect book. I would make a resource for C developers. Especially since you know C already.
Its a paradigm shift from pandas. In polars, you define a pipeline, or a set of instructions, to perform on a dataframe, and only execute them all at once at the end of your transformation. In other words, its lazy. Pandas is eager, which every part of the transformation happens sequentially and in isolation. Polars also has an eager API, but you likely want to use the lazy API in a production script.
Because its lazy, Polars performs query optimization, like a database does with a SQL query. At the end of the day, if you’re using polars for data engineering or in a pipeline, it’ll likely work much faster and more memory efficient. Polars also executes operations in parallel, as well.
How do you use Godot for data science?
This guy develops on windows
Thanks for sharing this codec wiki. Looks like an incredible project.
Futhark is another language with the same goals, executed differently.
First wow character. Not sure how I came up with it. I knew I wanted it in “two parts” so I could name all my wow characters the same way: rutrum, vinrum, seprum…and many others Im sure. Havent logged into world of warcraft in many many years.
Not cargo, but I use justfiles in all my projects: https://github.com/casey/just Its great for aliasing project-specific commands like what you have.
I use zola for my sites. It’s got not as many templates as hugo but my sites don’t use templates and I found it very straightforward to use from scratch.
I’ve done project rewrites. This minimizes the problem solving to mostly just syntax, sometimes a new paradigm if the framework is different enough. But in my experience a rewrites goes so much faster than I expect it, since theres a very clear goal to achieve while rewriting. If someone has an existing project to rewrite, I recommend it. If not, you could implement some project in a framework your comfortable with, and then do a rewrite in the new thing.
Just gonna throw out HJSON as another alternative: https://hjson.github.io/
I thinks a great idea but I have never seen it used in the wild, unforunately.
Is Lib.rs still closed source?
Yeah when you iterate over cards mutably, you’re borrowing it again at the line cards[id].copies +=… I think. If you’re going to access the card by index there then you loop over indicies at the top lop instead of iter_mut
There’s so many useful methods for iterators its worth reading the doc page to familiarize yourself. Its wicked powerful: https://doc.rust-lang.org/std/iter/trait.Iterator.html