IAMconsortium / pyam

Analysis & visualization of energy & climate scenarios
https://pyam-iamc.readthedocs.io/
Apache License 2.0
222 stars 116 forks source link

Add `pyam.read_excel` and `pyam.read_csv` functions #690

Open danielhuppmann opened 1 year ago

danielhuppmann commented 1 year ago

Per a discussion by @l-welder and @coroa on Slack...

Description

pyam currently uses pyam.IamDataFrame(<file>) to read data from an xlsx or csv file, which is different from specific top-level functions implemented by pandas: pandas.read_excel() and pandas.read_csv().

To add to the confusion, pyam has a utility method read_file() which is exposed as a package top-level function but does not return an IamDataFrame.

Proposed solution

For discussion

Should we add a deprecation-warning when initializing an IamDataFrame from file as pyam.IamDataFrame(<file>)? Or simply allow two parallel approaches going forward?