리스크 컨설턴트 성장기
프로필 배경
프로필 로고

리스크 컨설턴트 성장기

    • 분류 전체보기 (157)
      • About. (1)
      • Risk Management (1)
        • Credit Risk (1)
      • Data Science (46)
        • python (41)
        • R (2)
        • SQL (2)
        • SAS (0)
      • STAT & MATH (3)
        • calculus (3)
      • Jay's Project (19)
        • wanted 채용 공고 분석 (8)
        • 포켓몬 소드&실드 리뷰 분석 (6)
        • 교보문고 책 추천시스템 구현 (5)
      • Algorithm (0)
      • Archive (8)
      • TIL (42)
      • Code Cloud (34)
        • python (34)
        • R (0)
      • Trouble Shooting (3)
      • 일상 (0)
  • mode_edit_outline글작성
  • settings환경설정
  • 홈
  • 태그
  • 방명록
jupyter notebook 에서 dataframe 텍스트 정렬

jupyter notebook 에서 dataframe 텍스트 정렬

df.style.set_properties(**{'text-align: left/right'}) - right - left

  • format_list_bulleted Code Cloud/python
  • · 2022. 1. 3.
  • textsms

pandas 딕셔너리를 데이터프레임으로 변환 DataFrame.from_dict()

DataFrame.from_dict(data, orient='columns') data : 딕셔너리, array-like orient 인수(데이터의 방향설정) : columns 기본값 orient = columns : 딕셔너리의 키를 열의 레이블로 설정 orient = index : 딕서녀리의 키를 행의 레이블로 설정 https://kongdols-room.tistory.com/106 DataFrame의 생성(from_dict, from_record) - pandas(5) 파이썬 버전 3.7 기준 pandas 버전 0.25.1 기준 DataFrame의 하위 메서드를 사용한 DataFrame의 생성 본 포스팅에서는 DataFrame을 구축하기 위한 from_dict() 메서드와, from_records()..

  • format_list_bulleted Code Cloud/python
  • · 2022. 1. 2.
  • textsms

iframe 제목 확인 코드

iframe이 있으면 이름을 출력해준다. # 프레임 살펴보기 iframes = driver.find_elements_by_css_selector('iframe') for iframe in iframes: print(iframe.get_attribute('name'))

  • format_list_bulleted Code Cloud/python
  • · 2022. 1. 2.
  • textsms
pandas 결측값 확인 : pd.isna('데이터프레임')

pandas 결측값 확인 : pd.isna('데이터프레임')

pandas 결측값 확인 : pd.isna(데이터프레임) -> Boolean 으로 데이터프레임 결과 보여줌 pd.isna(데이터프레임)sum() -> 간단히 nan이 몇개 존재하는지 파악에 유용

  • format_list_bulleted Code Cloud/python
  • · 2021. 12. 28.
  • textsms

pandas 결측값 채우기 : df.fillna(value=)

pandas 결측값 채우기,대체하기 : df.fillna(value=)

  • format_list_bulleted Code Cloud/python
  • · 2021. 12. 28.
  • textsms

pandas 결측값 있는 행, 열 제거 : dropna(axis= )

결측값 있는 행 or 열 제거: df.dropna(axis= , how=) axis = 0 : 행 제거 , axis = 1 : 열 제거 how = all : 모든 값이 nan 일 때 제거 , how = any : 하나라도 nan 일 때 제거

  • format_list_bulleted Code Cloud/python
  • · 2021. 12. 28.
  • textsms

리스트 원소 추가/삭제

1. 리스트 원소 추가 append : 원소 마지막에 추가 insert : 리스트.insert(입력할index, 값) 연산자로 더하기 extend메소드 : 리스트.extend(추가할리스트) 2. 리스트 원소 삭제 del 키워드로 삭제 : del[삭제할 위치] list.remove(찾을아이템) : 찾을 아이템이 없으면 ValueError q 발생 list.pop(삭제할 위치) : default는 마지막 원소 삭제

  • format_list_bulleted Code Cloud/python
  • · 2021. 12. 25.
  • textsms

[pandas] 데이터 프레임 타입 변경 astype()

1. 타입 확인 : dtypes 2. 타입 변경 : astype('타입') - 원하는 컬럼의 타입만 바꾸기 astype({'columns':'type'})

  • format_list_bulleted Code Cloud/python
  • · 2021. 12. 21.
  • textsms

[pandas] 새로운 데이터 프레임 구성 df=[ [ '컬럼명1','컬럼명2'... ] ]

새로운 데이터 프레임 구성 df=[ [ '컬럼명1','컬럼명2'... ] ] 대괄호 두개를 쓰고 안에 가져올 컬럼명을 넣는다

  • format_list_bulleted Code Cloud/python
  • · 2021. 12. 21.
  • textsms

[pandas] 추출한 데이터프레임의 인덱스 제거 reset_index(drop= )

기존 데이터프레임에서 새로운 데이터프레임을 추출하여 만든 후 기존의 index 값을 reset 한다. index(drop=True) 는 기존의 index 값이 더 이상 필요없으니 삭제하라는 것 - df.loc[df['quantity']==3].head().reset_index(drop=True) quantity 컬럼 값이 3인 데이터를 추출하여 첫 5행 출력, index를 0부터 정렬

  • format_list_bulleted Code Cloud/python
  • · 2021. 12. 21.
  • textsms
  • «
  • 1
  • 2
  • 3
  • 4
  • »
공지사항
전체 카테고리
  • 분류 전체보기 (157)
    • About. (1)
    • Risk Management (1)
      • Credit Risk (1)
    • Data Science (46)
      • python (41)
      • R (2)
      • SQL (2)
      • SAS (0)
    • STAT & MATH (3)
      • calculus (3)
    • Jay's Project (19)
      • wanted 채용 공고 분석 (8)
      • 포켓몬 소드&실드 리뷰 분석 (6)
      • 교보문고 책 추천시스템 구현 (5)
    • Algorithm (0)
    • Archive (8)
    • TIL (42)
    • Code Cloud (34)
      • python (34)
      • R (0)
    • Trouble Shooting (3)
    • 일상 (0)
최근 글
인기 글
최근 댓글
태그
  • #파이썬
  • #데이터분석
  • #Crawling
  • #그리드서치
  • #키워드 픽
  • #추천시스템
  • #자연어처리
  • #Wanted
  • #책 분석
  • #python
  • #어간추출
  • #nlp
  • #wordcloud
  • #sklearn
  • #seaborn
  • #리뷰데이터
  • #KoNLPy
  • #감성분석
  • #텍스트데이터분석
  • #데이터분석가
  • #Okt
  • #CBF
  • #selenium
  • #리뷰분석
  • #크롤링
  • #시각화
  • #matplotlib
  • #decisionclassfier
  • #머신러닝
  • #gridsearch
전체 방문자
오늘
어제
전체
Copyright © 쭈미로운 생활 All rights reserved.
Designed by JJuum

티스토리툴바