Skip to content
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

Allow Optional columns in the dataframe while creating elements #420

Open
AnkurArohi opened this issue Jun 8, 2022 · 4 comments
Open

Allow Optional columns in the dataframe while creating elements #420

AnkurArohi opened this issue Jun 8, 2022 · 4 comments

Comments

@AnkurArohi
Copy link

  • Do you want to request a feature or report a bug?
    Feature

  • What is the current behavior?
    Currently only specific columns are allowed while creating a dataframe but on the other hand also the other columns must be
    allowed to be specified

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

  • What is the expected behavior?
    Bus and also other elements must be created even if there are other columns which are not mandatory

  • What is the motivation / use case for changing the behavior?
    Usability and info flow

  • Please tell us about your environment:

    • PowSyBl Version: ...
    • OS Version: ...
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, spectrum, etc)

(if a question doesn't apply, you can delete it)

@sylvlecl
Copy link
Contributor

I have a doubt about implementing this:
the tradeoff is between ease of use and safety/understandability.

On the one hand, today you must filter your columns, if you have too many, for ex:

# you need to filter df with the list of useful columns
network.create_buses(df[['voltage_level_id']])
# instead of 
network.create_buses(df)

On the other hand, allowing non-used columns could be error prone:

  • if you misspell a today optional column (for ex "nme" instead of "name"), you will not get an error any more
  • someone who reads your code may not understand what the other columns are used for and if they are actually useful in that method call or not

@AnkurArohi
Copy link
Author

Well, this is a question of usability, so if the user has the wish to add sone additional columns for his own personal use then it is OK, now if that column doesn't make sense to us , then so it is.

The bright side of it is for example if someone would like to use it for some other specific purpose they would be allowed to do so.

For example this can allow us to map sensitivity values from to a specific rmtarget of choice from a generator or even list of targets

@AnkurArohi
Copy link
Author

Regarding the filtering aspect well this is a tradeoff and the more user learns and reads documentation themore understandable it becomes

Although this filtering could be also in built so that we pick only relevant columns

@AnkurArohi
Copy link
Author

Reference- in pandapower you have the possibility to do that and it has helped us in building our own cgmes import

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

No branches or pull requests

2 participants