본문 바로가기

분류 전체보기273

Jupyter Notebook 글자 찾기,바꾸기 Find and Replace기능 글자 찾는거야 Ctrl+F 하면되는데 바꾸기는 어떻게할까? 예시) 경로표시는 /로 써야되는데 복붙하면 이런식으로 원화표시로 나온다./로 수정하기      그냥 셀클릭하고 Find and Replace를 하면 셀하나에 있는 내용만 수정이 가능한데 셀 왼쪽 부분을 Shift누르고 원하는 셀만 선택한뒤 Find and Replace를 하면 여러 셀을 수정가능하다  ++ 추가 ))화살표를 누르면 모든 cell을 다 검색한다.    최근 버전 Ctrl + F 누르면 우측에 저렇게 뜸토글버튼 눌러주면   내가 원하는 탭들을 선택하고, 필터모양(깔때기모양)을 눌러주고 Search in N Selected Cells를 눌러주면 선택한 탭에서만 수정이된다. 2022. 7. 30.
Seaborn : scatterplot xlim sns.scatterplot(data=midwest, x='poptotal', y='popasian') sns.scatterplot(data=midwest, x='poptotal', y='popasian').set(xlim=(0, 500000), ylim=(0, 10000)) 2022. 7. 30.
Seaborn : boxplot, 이상값 제거(1.5IQR) 한번에 여러개 만들기 in list를 이용해서 원하는 데이터만 boxplot import seaborn as sns import matplotlib.pyplot as plt plt.figure(figsize=(5,7)) sns.boxplot(data = mpg, y='hwy') sns.set_style('whitegrid') sns.set_context('paper') #이상값 제거 import numpy as np pct25 = mpg['hwy'].quantile(0.25) pct75 = mpg['hwy'].quantile(.75) iqr = pct75 - pct25 max = pct75 + 1.5 * iqr min = pct25 - 1.5 * iqr mpg['hwy'] = np.where((mpg['.. 2022. 7. 28.
Pandas DataFrame : query, assign, groupby, agg Do it 165~166p assign, agg로 column만들고, groupby로 정리. agg는 평균, 합같은걸 구할때 쓰고 assign은 저런식으로 사용 2022. 7. 26.
Pandas DataFrame : pivot aggfunc 옵션정리 https://datascientyst.com/list-aggregation-functions-aggfunc-groupby-pandas/ List of Aggregation Functions(aggfunc) for GroupBy in Pandas In this article, you can find the list of the available aggregation functions for groupby in Pandas: * count / nunique – non-null values / count number of unique values * min / max – minimum/maximum * first / last - return first or last value per group datasci.. 2022. 7. 25.
DataFrame : query 프로토타입 응용1 조건마다 괄호를 칠수도 있다. in을 사용할 수도 있고, DataFrame 외 변수를 사용할땐 @ 사용 응용2 ++추가 query문 쓰면 조금 짧아지고 직관적으로 바뀜 2022. 7. 24.
Reminiscence https://www.youtube.com/watch?v=VnE-c6qQ73c 라스트 카니발 연습하하다 레미니신스로 갈아탔다 1주쯤 연습했는데 벌써 2장정도칠줄안다 2022. 7. 24.
가장 심플한 막대그래프 df.plot : 판다스 plot https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.plot.html pandas.DataFrame.plot — pandas 1.4.3 documentation Name to use for the xlabel on x-axis. Default uses index name as xlabel, or the x-column name for planar plots. Changed in version 1.2.0: Now applicable to planar plots (scatter, hexbin). pandas.pydata.org plot은 matplotlib import없이도 사용가능하지만, 도화지 자체가 matplotlib이다(Axes-level) .. 2022. 7. 22.