본문 바로가기 메뉴 바로가기

Data Makes Our Future

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

Data Makes Our Future

검색하기 폼
  • 분류 전체보기 (749)
    • Data (18)
      • Statistics (10)
      • Analysis (8)
    • SQL (24)
      • Organize (3)
      • Install (2)
    • R (58)
      • Collection (4)
      • Process (33)
      • Analysis (11)
      • Visualize (4)
      • Install (3)
    • Python (56)
      • Collection (10)
      • Process (27)
      • Visualize (2)
      • Install (3)
    • Web (167)
      • API (16)
      • Spring (58)
      • JAVA (49)
      • Infra (14)
    • PS (366)
      • Algorithm (45)
      • Problem_Solving (311)
      • PS_Note (7)
    • Books (35)
    • ADsP (4)
    • eTc (17)
    • AI (4)
  • 방명록

DICTIONARY (2)
[Python] Json Type 로그 파일 분석

Json 구조의 로그 파일 분석 Json 구조의 로그 파일을 분석하는 코드를 작성해보자. 간단한 설명은 주석을 참고해보자. Log file Example Line-by-line json type. 라인 단위로 Json 형태의 로그가 저장되어있는 파일이다. {"success":"true", "fileType":"pdf", "summary":[{"page_count":"3", "sentence_count":"20", "char_count":"80"}]} {"success":"true", "fileType":"docx", "summary":[{"page_count":"6", "sentence_count":"50", "char_count":"140"}]} Code import json import os file..

Python 2021. 12. 18. 20:21
[Python] 딕셔너리(Dictionary)

딕셔너리(Dictionary) dic = { key1:value1, key2:value2, ...} # key, value 값을 갖는 자료구조 -> 빠른 입력과 출력# list in R = Python dictionary # Dictionary 생성>>> fruits = {'이름':'사과', '가격':2000, '수량':10}>>> fruits{'이름': '사과', '가격': 2000, '수량': 10}>>> type(fruits) # 새로운 key:value 삽입>>> fruits['크기'] = '중'>>> fruits{'이름': '사과', '가격': 2000, '수량': 10, '크기': '중'} # 수정 >>> fruits['크기'] = ['중','소'] # 리스트로도 수정 가능>>> fruits{..

Python/Process 2019. 1. 28. 21:14
이전 1 다음
이전 다음
최근에 올라온 글
최근에 달린 댓글
링크
  • Gitbook
  • resume
Total
Today
Yesterday
TAG
  • R
  • DFS
  • 시뮬레이션
  • dp
  • spring
  • PYTHON
  • coding
  • BOJ
  • DATA
  • Algorithm
  • c++
  • java
  • 백준
  • BFS
  • C
more

Blog is powered by Tistory / Designed by Tistory

티스토리툴바