modelmf module

This is a module for extending pandas dataframes with the modelflow toolbox

Created on Sat March 2019

@author: hanseni

class modelmf.mf(pandas_obj)[source]

Bases: object

A class to extend Pandas Dataframes with ModelFlow functionalities

Not to be used on its own

copy()[source]

copy a modelflow extended dataframe, so it remember its model and options

solve(start='', end='', **kwargs)[source]

Solves a model

makemodel(eq, **kwargs)[source]

Makes a model from equations

class modelmf.mfcalc(pandas_obj)[source]

Bases: object

Used to carry out calculation specified as equations

Parameters:
  • eq (TYPE) – Equations one on each line. can be started with <start end> to control calculation sample .

  • start (TYPE, optional) – DESCRIPTION. Defaults to ‘’.

  • end (TYPE, optional) – DESCRIPTION. Defaults to ‘’.

  • showeq (TYPE, optional) – If True the equations will be printed. Defaults to False.

  • **kwargs (TYPE) – Here all solve options can be provided.

Returns:

Dataframe.

class modelmf.mfupdate(pandas_obj)[source]

Bases: object

Extend a dataframe to update with values from another dataframe

second(df, safe=True)[source]
class modelmf.ibloc(pandas_obj)[source]

Bases: object

Extend a dataframe with a slice method which accepot wildcards in column selection.

The method just juse the method vlist from modelclass.model class

modelmf.f(a)[source]