Skip to content

pvsystem.sapm error with input module as type DataFrame #785

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cwhanse opened this issue Oct 3, 2019 · 3 comments
Closed

pvsystem.sapm error with input module as type DataFrame #785

cwhanse opened this issue Oct 3, 2019 · 3 comments

Comments

@cwhanse
Copy link
Member

cwhanse commented Oct 3, 2019

Describe the bug
Docstring for pvsystem.sapm states

    module : dict-like
        A dict, Series, or DataFrame defining the SAPM performance
        parameters. See the notes section for more details.

DataFrame input is not tested. The function errors when module parameter are supplied in a DataFrame.

To Reproduce
Steps to reproduce the behavior: see attached

Expected behavior
pvsystem.sapm should give correct results if parameters are in a DataFrame. Otherwise, we should remove the option from the docstring.

Versions:

  • pvlib.__version__: 0.6.1
  • pandas.__version__: 0.24.2
  • python: 3.6.8

sapm_dataframe.txt

@wholmgren
Copy link
Member

Is there a compelling reason to support a DataFrame input? If not, let's remove the option. I'm ok continuing to support Series because that's what you get when you select a column from the module parameters DataFrame.

@cwhanse
Copy link
Member Author

cwhanse commented Oct 3, 2019

The only use case I can think of is to calculate output for several modules with the same irradiance and temperature condition. It would be convenient to generate a table of output at STC, for example. Important? I'm not convinced.

@wholmgren
Copy link
Member

Sounds like a problem for a for loop or DataFrame.apply(axis=1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants