전체 글195 [vscode] python, "run selection/line in python interactive window 가 context menu" is missng vscode python extention 버전에 따라서 기본적으로 해당 메뉴가 context menu에서 빠져있는 경우가 있음 extention 의 extension settings 에서 selection으로 검색하면 해당 옵션을 킬수도 있고, 나 같은 경우는, 여러라인을 선택하고 run selection/line in python terminal 을 실행했더니 해당옵션을 사용해 볼래? 라고 suggestion이 떠서 사용하겠다고 옵션 설정할 수 있었음. 2020. 2. 28. [python] pythonic 한 코드 쓰기 계속 update 예정. if and : # do something cond1 = cond2 = if cond1 and cond2: # do something 2020. 2. 26. [python] dataframe 의 column 순서변경 cols = df.columns.tolist() tmp = cols[10] #11번째 column을 del cols[10] cols.insert(1,tmp) #2번째 위치로 df = df[cols] 2020. 2. 13. [pandas] loc[...] = value returns SettingWithCopyWarning https://github.com/pandas-dev/pandas/issues/17476 Code Sample # My code df.loc[0, 'column_name'] = 'foo bar' Problem description This code in Pandas 20.3 throws SettingWithCopyWarning and suggests to "Try using .loc[row_indexer,col_indexer] = value instead". I am already doing so, looks like there is a little bug. A> The issue here is that you're slicing you dataframe first with .loc in line 4. .. 2020. 2. 5. 이전 1 ··· 7 8 9 10 11 12 13 ··· 49 다음