# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

import pandas as pd
import re

file_path = './aw_or_links.csv'

regex = re.compile('\/content\/River\/detail\/id\/(?P<reach_id>\d+)\/')

df = pd.read_csv(file_path)
df.head()

df = df[df.URL.apply(lambda val: regex.match(val) is not None)].copy()
df.head()

print(list(df.URL.apply(lambda val: regex.match(val).group(1)).unique()))



StarcoderdataJupyterScriptsDedupFiltered