So DataFrames are basically spreasheets on steroids, or in-program database tables, but its potential as an Entity Component System for game development was never adequately explored.
It’s fair to say that Data Science/Machine Learning people pour orders of magnitude more resources into improving DataFrame libraries like Pandas than efforts towards all ECS implementations combined. It will probably continue to be the case.
(We’d be showing code using Polars/cuDF/Pandas, which range from “easier to get good performance out of but harder to code game logic with” to “easier to code game logic with but taking more effort to get good performance out of”, but their ideas are more similar than different.)
Using DataFrames is straightforward. A row can be thought of as an entity. A column represents a component (or part of a component, depending how you’d like to encode it). Columns(i.e. components) can be added dynamically. Each column can be a struct containing multiple fields.
As you can see everything is very dynamic and flexible. Arbitrary components can be added at runtime via adding a column, or removed by setting a cell to null, which is arguably a lot more flexible than most ECSs. This dynamic approach should also make DataFrames easier to be manipulated from scripting languages. Save/load can also be trivial.