Search code examples
pythonpandasdata-analysis

Are pandas Panels as efficient as multi-indexed DataFrames?


I am wondering whether there is any computational or storage disadvantage to using Panels instead of multi-indexed DataFrames in pandas.

Or are they the same behind the curtain?


Solution

  • they have a similiar storage mechanism, and only really differ in the indexing scheme. Performance wise they should be similar. There is more support (code-wise) for multi-level df's as they are more often used. In addition Panels have different silicing semantics, so dtype guarantees are different.