pyEPR.toolbox.pythonic module#

Created on Sat Feb 04 09:32:46 2017

@author: Zlatko K. Minev, pyEPR ream

pyEPR.toolbox.pythonic.DataFrame_col_diff(PS, indx=0)[source]#

Check whether the columns of a DataFrame are equal.

Returns a boolean Series of the row index specifying which rows differ:

PS[DataFrame_col_diff(PS)]
pyEPR.toolbox.pythonic.combinekw(kw1, kw2)[source]#

Copy kw1, update with kw2, return result

pyEPR.toolbox.pythonic.df_find_index(s: Series, find, degree=2, ax=False)[source]#

Given a Pandas Series such as of freq with index Lj, find the Lj that would give the right frequency

pyEPR.toolbox.pythonic.divide_diagonal_by_2(CHI0, div_fact=2.0)[source]#
pyEPR.toolbox.pythonic.fact(n)[source]#

Factorial

pyEPR.toolbox.pythonic.nck(n, k)[source]#

choose

pyEPR.toolbox.pythonic.print_NoNewLine(text)[source]#
pyEPR.toolbox.pythonic.print_matrix(M, frmt='{:7.2f}', append_row='')[source]#
pyEPR.toolbox.pythonic.robust_percentile(calc_data, ROBUST_PERCENTILE=2.0)[source]#

analysis helper function

pyEPR.toolbox.pythonic.sort_Series_idx(sr)[source]#

Sort Series index numerically (int or float) when possible, else lexicographically.

pyEPR.toolbox.pythonic.sort_df_col(df)[source]#

Sort DataFrame columns numerically (int or float) when possible, else lexicographically.

pyEPR.toolbox.pythonic.xarray_unravel_levels(arr, names, my_convert=<function <lambda>>)[source]#

Takes in nested dict of dict of dataframes names : names of lists; you dont have to include the last two dataframe columns & rows, but you can to override them requires xarray