powsybl / pypowsybl

A PowSyBl and Python integration based on GraalVM native image
Mozilla Public License 2.0
52 stars 10 forks source link

update of df for multiple rows fails/not user friendly #485

Open AnkurArohi opened 1 year ago

AnkurArohi commented 1 year ago

something like this

powsybl_net.get_generators().loc[:,"voltage_regulator_on"] = True

User friendliness

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

EtienneLt commented 1 year ago

Hello, you can do it like that

net.update_generators(id=net.get_generators().index, voltage_regulator_on=[True]*len(net.get_generators().index))
AnkurArohi commented 1 year ago

Hello, you can do it like that

net.update_generators(id=net.get_generators().index, voltage_regulator_on=[True]*len(net.get_generators().index))

Thanks for your reply, Yes but I find this not user friendly, thats why i mentioned that this is not a bug, but this is according to me not an elegant way of doing it