예제 #1
0
def concepts():
    x = pd.read_csv("metadata/concepts.csv")
    x.rename(columns={"concept": "concept_name"}, inplace=True)
    valid = x.ix[:, "concept_name"].duplicated() == False
    x = x.ix[valid]
    dor1.lower_all_names(x)
    x.to_csv("ddionrails/concepts.csv", index=False)
예제 #2
0
def concepts():
    x = pd.read_csv("metadata/concepts.csv")
    x.rename(columns={
        "concept":"concept_name",
    }, inplace=True)
    valid = x.ix[ : , "concept_name"].duplicated() == False
    x = x.ix[valid]
    dor1.lower_all_names(x)
    x.to_csv("ddionrails/concepts.csv", index=False)
예제 #3
0
def datasets():
    x = pd.read_csv("metadata/datasets.csv")
    x.rename(columns={
        "study":"study_name",
        "dataset":"dataset_name",
        "period":"period_name",
        "analysis_unit":"analysis_unit_name",
        "conceptual_dataset":"conceptual_dataset_name",
    }, inplace=True)
    dor1.lower_all_names(x)
    x.to_csv("ddionrails/datasets.csv", index=False)
예제 #4
0
def variables():
    x = pd.read_csv("metadata/variables.csv")
    x.rename(columns={
        "study":"study_name",
        "dataset":"dataset_name",
        "varname":"variable_name",
        "concept":"concept_name",
    }, inplace=True)
    valid = x.ix[ : , ("study_name", "dataset_name", "variable_name")].duplicated() == False
    x = x.ix[valid]
    dor1.lower_all_names(x)
    x.to_csv("ddionrails/variables.csv", index=False)
예제 #5
0
def read_variables():
    x = pd.read_csv("metadata/variables.csv")
    x.rename(
        columns={
            "study": "study_name",
            "dataset": "dataset_name",
            "varname": "variable_name",
            "concept": "concept_name",
        },
        inplace=True,
    )
    valid = (
        x.ix[:, ("study_name", "dataset_name", "variable_name")].duplicated() == False
    )
    x = x.ix[valid]
    dor1.lower_all_names(x)
    return x
예제 #6
0
def read_variables():
    x = pd.read_csv("metadata/variables.csv")
    x.rename(
        columns={
            "study": "study_name",
            "dataset": "dataset_name",
            "varname": "variable_name",
            "concept": "concept_name",
        },
        inplace=True,
    )
    valid = (
        x.ix[:, ("study_name", "dataset_name", "variable_name")].duplicated() == False
    )
    x = x.ix[valid]
    dor1.lower_all_names(x)
    return x