AI/Pandas

    사람별로 데이터 프레임 관리할 때

    예를들어 10명의 인간이있고 각각 10개씩 데이터프레임이 있다고하면 단순하게 "전체리스트 하나 만들어서 리스트 안에 데이터 프레임 넣으면 됨" 반복을 안에서 append한번, 밖에서 append한 번 하면 간단. ex. 예를들어 넘파이 어레이가 human으로 존재한다 10명씩 10개 존재한다 치고, total_df = list() for i in range(len( human )): total_df_temp = list() for j in range(len( human[i])): temp_df = pd.DataFrame( human [i][j] ) temp_df_100mean = 작업진행함수( human[i][j]) total_df_temp.append(temp_df_100mean) total_df.ap..

    [판다스] Nan 값 있는 행 대체하며 merge

    https://stackoverflow.com/questions/59045507/how-to-merge-two-dataframes-and-keep-the-non-nan-values-in-it How to merge two dataframes and keep the non -nan values in it df1 0 Name phone Marks 1 mark 1225 20.0 2 charles 165498 36.5 3 oscar 1567 nan 4 bucky 13579 22.0 5 austin 1365... stackoverflow.com merge 대신 update 이용하기. 예시 : df1.update(df2)

    [판다스] 행 열 삭제 방법들

    https://www.freecodecamp.org/korean/news/untitled/

    [파이썬] 딕셔너리 데이터프레임화 하기

    https://www.bmc.com/blogs/pandas-create-dataframe-dictionary/ How To Create a Pandas Dataframe from a Dictionary www.bmc.com

    다중인덱싱

    https://blockchainstudy.tistory.com/45 14. Pandas - 다중인덱싱(Multi Index) 1. 다중인덱싱 생성 인덱스가 2개일 수도 있을까? 인덱스가 2개인 경우, 다중 인덱싱이 가능하다. 인덱스가 사람이름, 교과목명 2가지인 경우, 다음과 같이 만들 수 있다. 1) DataFrame에서는 생성자 blockchainstudy.tistory.com https://seong6496.tistory.com/157 [Pandas] 데이터프레임 멀티인덱스 다루기(loc,xs) 판다스에서 멀티인덱서 다루는 방법입니다. 제가 이전에 groupby에 대해 써놓은 게 있는데 그 상황에서 멀티인덱서를 다뤄보겠습니다. 두가지 방법으로 loc,xs가 있긴 하지만 사실상 실제적으로 많 seo..