icaros-usc / pyribs

A bare-bones Python library for quality diversity optimization.
https://pyribs.org
MIT License
208 stars 34 forks source link

Deprecate `as_pandas` in favor of `data(return_type="pandas")` #408

Closed btjanaka closed 10 months ago

btjanaka commented 10 months ago

Description

Due to the new data method (#412), as_pandas is no longer necessary, as data provides more flexible options for accessing archive data, and it is also able to return dataframes by passing return_type="pandas".

This PR thus deprecates as_pandas. Because this is a fairly popular method, I have kept the method and raised a RuntimeError whenever it is called; however, I anticipate removing the method entirely in the future.

I also considered keeping as_pandas as an alias to data(return_type="pandas"), but this would require changing the parameters of as_pandas since data takes in fields rather than include_solutions and include_metadata. Removing as_pandas entirely makes it clear that it has been deprecated.

TODO

Questions

Status