Closed syclops closed 3 years ago
Thanks for letting me know about this. I am currently working on Version 4 of the book, which is based on a greatly simplified version of modsim.py
. In this version, the results from TimeSeries
and SweepSeries
are just Pandas Series
objects. Since there is no more subclassing, problems like this should be resolved.
The following code results in a Pandas KeyError:
This seems to be the result of the definition of
ModSimSeries
, in which the property definitions ofdt
andT
callpandas.Series.loc
. As a result, when callingdir(foo)
, the standard Python library (accessor.py
) seems to try to get a nonexistent row.Oddly, defining only
dt
as a row index in the series seems to fix this:I suspect that this can be handled by overriding the default
__getattribute__
or__getattr__
inModSimSeries
.