본문 바로가기

Python_Intermediate/Pandas

(64)
Pandas - 190530 노트북 제품 비교 분석 1. Import Modulefrom Crawler import crawler from pandas import DataFrame from pandas import concat 2. Parsing Data검색할 내용을 입력하세요 : 노트북 제품명 ... 듀얼그래픽-지포스0 삼성전자 노트북 PEN S NT950SBV-A58A ... NaN0 삼성전자 노트북9 ALWAYS NT950XBV-G58A ... NaN0 삼성전자 노트북9 METAL NT900X5R-K18WA ... NaN0 삼성전자 노트북5 NT550EBZ-AD1A ... NaN0 삼성전자 노트북5 NT550EBZ-AD2A ... NaN0 LG전자 그램17 17ZD990-VX50K ... NaN0 LG전자 그램15 15ZD990-VX50K ... ..
Pandas - 190529모니터 제품 비교 분석 1. Import Modulefrom Crawler import crawler from pandas import DataFrame from pandas import concat 2. Parsing Data검색할 내용을 입력하세요 : 모니터 제품명 ... 호스트0 삼성전자 S27R750 SPACE ... NaN0 삼성전자 S32R750 SPACE ... NaN0 삼성전자 C32F397 ... NaN0 삼성전자 S24F350 ... NaN0 삼성전자 S24D300 ... NaN0 삼성전자 C27F391 ... NaN0 삼성전자 S24F350 ... NaN0 LG전자 24MK400H ... NaN0 삼성전자 C27F390 ... NaN0 한성컴퓨터 Ultron 2457C 커브드 144 ... NaN0 한성컴퓨..
Python Pandas 박스오피스 180528 순위 분석 - Import Moduleimport datetime as dt import requests import json import pandas from pandas import DataFrame from matplotlib import pyplot from print_df import print_df - Parsing Data+---+----------+------------+---------+-----------+----------+--------------------+------------+------+-----------+---------------+------+--------------+-----------+-------------+------------+------------+---------+-..
190529 11:40> Naver 실시간 검색어 20위 - Naver 실시간 검색어 분석 - Import Modulefrom Crawler import crawler from print_df import print_df from pandas import DataFrame - Data 분석 순서데이터 수집 -> 크롤링 수행 -> 데이터 전처리 -> 검색어를 리스트로 분류 -> 데이터 프레임 생성 - Data Frame+------+-------------------+| | 검색어 |+------+-------------------+| 01위 | 김현철 정신과의사 || 02위 | 원더투어 제주항공 || 03위 | 김희영 || 04위 | 위메프 패션왕 || 05위 | 이의정 || 06위 | 신림동 || 07위 | 한국 남아공 || 08위 | 말레피센트 || 09위..
Pandas - Json Data 분석 4(Data 시각화) 1. Data Codeimport json from pandas import DataFrame, Series import pandas as pd import numpy as np import matplotlib.pyplot as plt from print_df import print_df path = 'data\example.txt' data = open(path, encoding='utf-8').read() records = [json.loads(line) for line in open(path, encoding='utf-8')] time_zone = [rec['tz'] for rec in records if 'tz' in rec] def get_count(sequence): counts = {} # ..
Pandas - 데이터프레임 병합(merge) 1. 데이터프레임 병합(merge)Data Table 중에 여러개의 csv로 되어있으나 파일은 서로 연관성이 있는 경우도 있다.이를 병합하는 과정이 필요하다. 2. SampleData 3. Import Moduleimport pandas as pd from print_df import print_df 4. Data Code- person DataFrameperson = pd.read_csv('data\survey_person.csv') +---+----------+-----------+----------+| | ident | personal | family |+---+----------+-----------+----------+| 0 | dyer | William | Dyer || 1 | pb | Fra..
Pandas - 1880 ~ 2010 년까지 출생 자료 분석 2 1. Sample Data1880 ~ 2010 년까지 태어난 아이의 이름 / 성별 / 출생수https://developer-ankiwoong.tistory.com/268 2. Import Moduleimport pandas as pd import matplotlib.pyplot as plt from print_df import print_df 3. Pandas Data Code- TXT 파일 읽어서 DataBase화years = range(1880, 2011) df_pieces = [] # 1880 ~ 2010년 까지의 데이터 프레임을 젖아할 리스트 for year in years: # 1880 ~ 2010 path = 'data\yob%d.txt' % year # 파일 이름 df = pd.read_cs..
Pandas - 1880 ~ 2010 년까지 출생 자료 분석 1 1. Sample Data1880 ~ 2010 년까지 태어난 아이의 이름 / 성별 / 출생수 2. Import Moduleimport pandas as pd import matplotlib.pyplot as plt from print_df import print_df 3. Pandas Data Code- 일부 파일에 DataFrame 작업(파일에 컬럼명이 없으므로 header=None / 필요한 컬럼명 지정)names1880 = pd.read_csv('data\yob1880.txt', header=None, names=['name', 'gender', 'born'], encoding='utf-8') - DataFrame 정보 확인print(names1880.info()) RangeIndex: 2000 e..