Module pyfx.pricingscience.utils

Functions and utilities for python.

Functions

def single_row_df_to_series(df: pandas.core.frame.DataFrame) ‑> Optional[pandas.core.series.Series]

Utility function transforming single row pd.DataFrame into a pd.Series.

Args

df : pd.DataFrame
the dataframe containing the single row

Returns

pd.Series(): Pandas Series containing the unique row

Raises

ValueError
if the DataFrame is not single row.