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

None of [Int64Index([ ')] are in the [index]" #2237

Open
seilsepour opened this issue Mar 21, 2024 · 0 comments
Open

None of [Int64Index([ ')] are in the [index]" #2237

seilsepour opened this issue Mar 21, 2024 · 0 comments

Comments

@seilsepour
Copy link

Hi there,
I am new in pandapower. I have created an IEEE-33 bus network, and I want to plot it now. I wrote this code:

plot.fuse_geodata(net)
bc = plot.create_bus_collection(net, net.bus.index, size=.2, color=colors[0], zorder=10)
tlc, tpc = plot.create_trafo_collection(net, net.trafo.index, color="g")
lcd = plot.create_line_collection(net, net.line.index, color="grey", linewidths=0.5, use_bus_geodata=True)
sc = plot.create_bus_collection(net, net.ext_grid.bus.values, patch_type="rect", size=.5, color="y", zorder=11)
plot.draw_collections([lcd, bc, tlc, tpc, sc], figsize=(8,6))

when I run it, I got the following error in the second line:

/usr/local/lib/python3.10/dist-packages/pandas/core/indexes/base.py in _raise_if_missing(self, key, indexer, axis_name)
6128 if not self._should_compare(target) and not self._should_partial_index(target):
6129 # _should_partial_index e.g. IntervalIndex with numeric scalars
-> 6130 # that can be matched to Interval scalars.
6131 return self._get_indexer_non_comparable(target, method=None, unique=False)
6132

KeyError: "None of [Int64Index([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,\n 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,\n 33],\n dtype='int64')] are in the [index]"

Would you please help me?

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

1 participant