Values

Values.sum_(col: str) → float

Returns the sum of all values in a column

Parameters:col (str) – column name
Returns:sum of all the column values
Return type:float
Example:sum = ds.sum_("Col 1")
Values.dropr(*rows)

Drops some rows from the main dataframe

Parameters:rows (list of ints) – rows names
Example:ds.drop_rows([0, 2])
Values.apply(function, *cols, axis=1, **kwargs)

Apply a function on columns values

Parameters:
  • function (function) – a function to apply to the columns
  • cols (name of columns) – columns names
  • axis – index (0) or column (1), default is 1
  • kwargs (optional) – arguments for df.apply
Example:
def f(row):
        # add a new column with a value
        row["newcol"] = row["Col 1] + 1
        return row

ds.apply(f)
Values.pivot(index, **kwargs)

Pivots a dataframe

Quantiles

Values.trimquants(col: str, inf: float, sup: float)

Remove superior and inferior quantiles from the dataframe

Parameters:
  • col (str) – column name
  • inf (float) – inferior quantile
  • sup (float) – superior quantile
Example:

ds.trimquants("Col 1", 0.01, 0.99)

Values.trimsquants(col: str, sup: float)

Remove superior quantiles from the dataframe

Parameters:
  • col (str) – column name
  • sup (float) – superior quantile
Example:

ds.trimsquants("Col 1", 0.99)

Values.trimiquants(col: str, inf: float)

Remove superior and inferior quantiles from the dataframe

Parameters:
  • col (str) – column name
  • inf (float) – inferior quantile
Example:

ds.trimiquants("Col 1", 0.05)