Object -

def filter(df_pvr): filtered_df = df_pvr.copy(deep=True) exist_round = [] none_round = [] for index, row in df_pvr.iterrows(): if row['sourcepath'] in exist_round: continue elif row['sourcepath'] in none_round: filtered_df = filtered_df.drop([index]) else: if index % 2 == 0: none_round.append(row['sourcepath']) else: exist_round.append(row['sourcepath']) return filtered_df
검증이 아직 안되서 비교
df_pvr.to_sql('pvr', con=dst_engine, if_exists='replace')

이정도면 뭐 충분히 검증된듯
지리는 코딩 한번만에 후
이제 filter sourcepath 로 업데이트
Using Python, how can I access a shared folder on windows network?
I have a file that I would like to copy from a shared folder which is in a shared folder on a different system, but on the same network. How can I access the folder/file? The usual open() method do...
https://stackoverflow.com/questions/7169845/using-python-how-can-i-access-a-shared-folder-on-windows-network
nas verifier 실수인데 바로 location 접근 안되고 //10.0.01.148
요런식으로 읽어야함 또 folder 하나 해줘서

여기부터 읽어짐
Python Check If File or Directory Exists
In this tutorial, we will learn how to determine whether a file (or directory) exists using Python. To check this, we use Built-in library functions.
https://www.guru99.com/python-check-if-file-exists.html

def filter(df_pvr): filtered_df = df_pvr.copy(deep=True) exist_round = [] none_round = [] for index, row in df_pvr.iterrows(): if row['sourcepath'] in exist_round: continue elif row['sourcepath'] in none_round: filtered_df = filtered_df.drop([index]) else: inner_folder = row['sourcepath'].split(':')[-1] net_path = NAS + inner_folder if exists(net_path): exist_round.append(row['sourcepath']) else: none_round.append(row['sourcepath']) return filtered_df

다 들어가야하는 필터로 다 들어감 이제 추가해야지?
간단하다
def filter(df_pvr): filtered_df = df_pvr.copy(deep=True) exist_round = [] none_round = [] for index, row in df_pvr.iterrows(): if row['sourcepath'] in exist_round: continue elif row['sourcepath'] in none_round: filtered_df = filtered_df.drop([index]) else: inner_folder = row['sourcepath'].split(':')[-1] net_path = NAS + inner_folder + TILE_FOLDER if exists(net_path): exist_round.append(row['sourcepath']) else: none_round.append(row['sourcepath']) return filtered_df
파이썬 파트14. 리스트 더 알아보기 - split, join, slice
try hello world 파이썬 입문 강의 list.index( value ) : 값을 이용하여 위치를 찾는 기능 list.extend( [value1, value2] ) : 리스트 뒤에 값을 추가 ('+'연산자 보다 성능이 좋음) list.insert( index, value ) : 원하는 위치에 값을 추가 list.sort( ) : 값을 순서대로 정렬 list.reverse( ) : 값을 역순으로 정렬 서로 변환이 가능하다.
https://wayhome25.github.io/python/2017/02/26/py-14-list/

기능 자체는 다 완성이고 이제 맞추기
pvrid
요상하게 많은 하천

위치는 맞는데 평소보다 강이 길죠?
TILE_FOLDER = '/tiles_recolor'
recolor 로 바꿔보면

recolor 는 또다르군...
그냥 pvrid 매칭이나 해야겠다

Seonglae Cho