Menu675 Best Practices with Pandas Source: www.youtube.com/playlist?list=PL5-da3qGB5IBITZj_dYSFqnd_15JgqwA6 Best practices with pandas Learn how to perform a variety of data science tasks on real-world datasets using pandas. With each task, you'll learn how to avoid either a pandas pitfall o... www.youtube.com 2020. 11. 28. Pandas - Dropna Function df.dropna( ) df에 NaN 값이 있으면 해당 row 통째로 제거 df.dropna(how='all') 모든 row가 NaN일때만 row 제거 df.dropna(axis=1) df.dropna(axis=1, how='all') default가 row이므로 axis를 column으로 변경 df.dropna(thresh=n) 각 row에서 NaN이 아닌 값이 최소 n개보다 적으면 해당 row 제거 2020. 11. 28. Pandas - DataFrame 원하는 조건으로 조회 Excel Filter 기능처럼 원하는 조건으로 DataFrame을 조회하고 싶을 때 사용하는 방법 Case 1 movies.head() movies.genre.unique() #필터를 원하는 column 중 해당 column에 어떤 종류들이 있는 지 조회 movies[(movies.genre == 'Action') | (movies.genre == 'Drama') | (movies.genre == 'Family')] Case 2 movies[movies.genre.isin(['Action', 'Drama', 'Family'])] Case 3 movies[~movies.genre.isin(['Action', 'Drama', 'Family'])] 위 조건 'Action', 'Drama', 'Family'를.. 2020. 11. 27. Pandas - Sample Function frac: 전체 개수의 비율(75%)만큼 random으로 추출 random_state: random 추출 재현성을 위한 번호 저장 예) 위 예시와 같이 random_state=100으로 지정하면, 일종의 고정 호출로 고정되어 같은 랜덤 숫자를 추출한다. 2020. 11. 27. Top 25 pandas tricks Source: youtu.be/RlIiVeig3hc 2020. 11. 27. 5 new changes in pandas you need to know about Source: youtu.be/te5JrSCW-LY 2020. 11. 27. 4 new time-saving tricks in pandas Source:youtu.be/-NbY7E9hKxk Cheat Sheet: github.com/pandas-dev/pandas/blob/master/doc/cheatsheet/Pandas_Cheat_Sheet.pdf pandas-dev/pandas Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more - pandas-dev/pandas github.com 2020. 11. 26. How do I use the MultiIndex in pandas? Source: youtu.be/tcRGa2soc-c 2020. 11. 26. How do I apply a function to a pandas Series or DataFrame? Source: youtu.be/P_q0tkYqvSk 2020. 11. 26. How do I create a pandas DataFrame from another object? Source: youtu.be/-Ov1N1_FbP8 2020. 11. 26. How do I change display options in pandas? Source: youtu.be/yiO43TQ4xvc 2020. 11. 26. How do I avoid a SettingWithCopyWarning in pandas? Source: youtu.be/4R4WsDJ-KVc 2020. 11. 26. How do I find and remove duplicate rows in pandas? Source: youtu.be/ht5buXUMqkQ 2020. 11. 26. How do I work with dates and times in pandas? Source: youtu.be/yCgJGsg0Xa4 2020. 11. 26. How do I create dummy variables in pandas? Source: youtu.be/0s_1IsROgDc 2020. 11. 26. 이전 1 ··· 22 23 24 25 26 27 28 ··· 45 다음