Skip to content

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

Closed

Description

@cwhanse

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

Activity

  1. wholmgren commented on Oct 3, 2019

    @wholmgren
    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.

  2. cwhanse commented on Oct 3, 2019

    @cwhanse
    MemberAuthor

    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.

  3. wholmgren commented on Oct 3, 2019

    @wholmgren
    Member

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

  4. added this to the 0.7.0 milestone on Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions