cymetric.tools - Tools

General cymetric tools.

cymetric.tools.dbopen(fname)

Opens a Cyclus database.

cymetric.tools.ensure_dt_bytes(dt)

Ensures that a structured numpy dtype is given in a Python 2 & 3 compatible way.

cymetric.tools.merge_and_fillna_col(left, right, lcol, rcol, how='inner', on=None)

Merges two dataframes and fills the values of the left column with the values from the right column. A copy of left is returned.

Parameters:

left : pd.DataFrame

The left data frame

right : pd.DataFrame

The right data frame

lcol : str

The left column name

rcol : str

The right column name

how : str, optional

How to perform merge, same as in pd.merge()

on : list of str, optional

Which columns to merge on, same as in pd.merge()

cymetric.tools.raise_no_pyne(msg, have_pyne=False)

Raise an error when PyNE cannot be found.

cymetric.tools.raw_to_series(df, idx, val)

Convert data frame to series with multi-index.