def RPM(raw_counts):
    """
    Reads Per Million.

    Args:
        raw_counts (pandas.DataFrame): raw RNAseq counts where rows are genes
            and columns are conditions

    Returns:
        pandas.DataFrame: Normalized counts

    Examples:
        >>> import numpy as np
        >>> np.random.seed(0)
        >>> import pandas as pd
        >>> nb_genes = 1000
        >>> nb_conditions = 5
        >>> raw_counts = np.random.randint(0,1e6,(nb_genes,nb_conditions))
        >>> raw_counts = pd.DataFrame(raw_counts)
        >>> rpm = RPM(raw_counts)
        >>> rpm.head()
                    0            1            2            3            4
        0  1994.031850   617.999738   895.038590   234.467249  1929.409246
        1   308.104674  1783.727269   738.867008   604.569366   245.491264
        2  1235.090833   906.128463   769.221953  1462.698984  1474.653899
        3   628.576824   344.838319  1723.115991  1201.585019  1084.225878
        4  1921.133736  1363.195297   761.440687  1481.020714  1777.679267

    """
    pmf = raw_counts.sum(axis=0) / 1000000.0
    rpm = raw_counts / pmf
    return rpm
