You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently have 5 distinct ways of initializing a BeliefsDataFrame (see below), all handled by a single __init__ function. It's not very clear which method is being supported by each code block in this function. We should detect the initialization method early on and call separate functions for each method to keep it clean. Alternatively, we could implement separate class methods for alternative constructors. This is what Geopandas (a more advanced library that subclasses pandas Series and DataFrames) does.
Initialization methods
from a list of timely_beliefs.TimedBelief objects
from a pandas.DataFrame object and a timely_beliefs.Sensor object
from a pandas.Series object and a timely_beliefs.Sensor object
from a timely_beliefs.BeliefsSeries object (undocumented)
from a timely_beliefs.BeliefsDataFrame object (undocumented)
And a 6th implemented as a separate function (timely_beliefs.read_csv) that uses method 2 internally.
The text was updated successfully, but these errors were encountered:
We currently have 5 distinct ways of initializing a BeliefsDataFrame (see below), all handled by a single
__init__
function. It's not very clear which method is being supported by each code block in this function. We should detect the initialization method early on and call separate functions for each method to keep it clean. Alternatively, we could implement separate class methods for alternative constructors. This is what Geopandas (a more advanced library that subclasses pandas Series and DataFrames) does.Initialization methods
timely_beliefs.TimedBelief
objectspandas.DataFrame
object and atimely_beliefs.Sensor
objectpandas.Series
object and atimely_beliefs.Sensor
objecttimely_beliefs.BeliefsSeries
object (undocumented)timely_beliefs.BeliefsDataFrame
object (undocumented)And a 6th implemented as a separate function (
timely_beliefs.read_csv
) that uses method 2 internally.The text was updated successfully, but these errors were encountered: