예제 #1
0
    def test_parse_add_info(self):
        s = "'SCH1'"
        v = utils.parse_add_info(s)
        self.assertEqual(v, "1) spoor schelpmateriaal <1% ")

        s = "'DO TOL RO'"
        v = utils.parse_add_info(s)
        self.assertEqual(v, "1) dark olive-red ")

        s = "'BIO'"
        v = utils.parse_add_info(s)
        self.assertEqual(v, "1) bioturbatie ")

        s = "'KEL DR'"
        v = utils.parse_add_info(s)
        self.assertEqual(v, "1) keileem Formatie van Drente ")
예제 #2
0
    def test_parse_add_info(self):
        s = "'SCH1'"
        v = utils.parse_add_info(s)
        self.assertEqual(v, "spoor schelpmateriaal <1%|")

        s = "'DO TOL RO'"
        v = utils.parse_add_info(s)
        self.assertEqual(v, "dark olive-red|")

        s = "'BIO'"
        v = utils.parse_add_info(s)
        self.assertEqual(v, "bioturbatie|")

        s = "'KEL DR'"
        v = utils.parse_add_info(s)
        self.assertEqual(v, "keileem|Formatie van Drente|")
예제 #3
0
파일: gef.py 프로젝트: ThomasSweijen/pygef
 def parse_add_info_as_string(data_rows_soil):
     add_infos = ['additional_info']
     lst = []
     for row in data_rows_soil:
         add_info = ""
         for i in range(len(row) - 1):
             if i >= 1:
                 add_info = add_info + utils.parse_add_info(row[i])
         lst.append(add_info)
     df_add_infos = pd.DataFrame(lst, columns=add_infos)
     return df_add_infos
예제 #4
0
 def parse_add_info_as_string(df, data_rows_soil):
     return df.assign(
         remarks=[utils.parse_add_info("".join(row[1::])) for row in data_rows_soil]
     )
예제 #5
0
    def parse_add_info_as_string(df, data_rows_soil):
        df["remarks"] = [
            utils.parse_add_info("".join(row[1::])) for row in data_rows_soil
        ]

        return df