Closed MaxGhenis closed 3 years ago
This works in pandas and should produce a MicroDataFrame with only the column x:
pandas
MicroDataFrame
x
d = mdf.MicroDataFrame(dict(x=[1, 2], y=[3, 4]), weights=[5, 6]) d[["x"]]
But it errors out instead:
KeyError: "None of [Index(['x'], dtype='object')] are in the [index]"
This should just be self.weights:
self.weights
https://github.com/PSLmodels/microdf/blob/0760dfecae5a5b8974d87622644f0df6248e26ce/microdf/generic.py#L596
This works in
pandas
and should produce aMicroDataFrame
with only the columnx
:But it errors out instead: