PyvtTbl objects are containers for holding pivoted data. They are instantiated through DataFrame.pivot.
Additional methods inherented from np.ma.MaskedArray that are not explicitely listed here may also be available. Keep in mind methods not listed here may not been have extensively tested.
See also
creates a new PyvtTbl from scratch
- args:
data: np.ma.array object holding pivoted data
val: string label for the data in the table
conditions: Dictset representing the factors and levels in the table
rnames: list of row labels
cnames: list of column labels
aggregate: string describing the aggregate function applied to the data
- kwds:
calc tots: bool specifying whether totals were calculated
row_tots: row totals in a MaskedArray
col_tots: column totals in a MaskedArray
grand_tot: float holding grand total
attach_rlabels: bool specifying whether row labels are part of the table
returns a transposed PyvtTbl object
Return the item described by indx, as a PyvtTbl
- args:
- indx: index to array
can be int, tuple(int, int), tuple(slice, int), tuple(int, slice) or tuple(slice, slice)
x[int] <==> x[int,:]
- returns:
- PyvtTbl that is at least 2-dimensional (unless indx is tuple(int, int))
Convert the input to an array.
dtype: data-type. By default, the data-type is inferred from the input data.
returns a the PyvtTbl flattened as a MaskedArray
Multidimensional index iterator.
Flat iterator object to iterate over PyvtTbl.
returns a machine friendly string representation of the object
returns a human friendly string representation of the table
returns a DataFrame excluding row and column totals
Add other to self, and return a new PyvtTbl.
Add other to self, and return a new PyvtTbl.
Subtract other to self, and return a new PyvtTbl.
Subtract other to self, and return a new PyvtTbl.
Raise self to the power other, masking the potential NaNs/Infs
Multiply other by self, and return a new PyvtTbl.
Multiply other by self, and return a new PyvtTbl.
Divide other into self, and return a new PyvtTbl.
x.__rdiv__(y) <==> y/x
Divide other into self, and return a new PyvtTbl.
Divide other into self, and return a new PyvtTbl.
Divide other into self, and return a new PyvtTbl.
Divide other into self, and return a new PyvtTbl.