Skip to content

add support for single variable as string. #36

@github-actions

Description

@github-actions

#TODO: add support for single variable as string.
#Issue URL: https://github.com/morpc/morpc-py/issues/36

    import numpy as np
    import pandas as pd
    #TODO: add support for single variable as string.
    #Issue URL: https://github.com/morpc/morpc-py/issues/36
    
    labelSeries = labelSeries \
        .apply(lambda x:x.split("|")[0]) \
        .str.strip() \
        .str.replace("Estimate!!","") \
        .apply(lambda x:x.split(":"))
    df = labelSeries \
        .apply(pd.Series) \
        .drop(columns=[0, 1]) \
        .replace("", np.nan)
    if(type(dimensionNames) == list):
        df.columns = dimensionNames

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions