판다스 > 데이터프레임 값, 메타정보 둘러보기
import pandas as pd import numpy as np import seaborn as sns import ssl from bs4 import BeautifulSoup import requests import re ssl._create_default_https_context = ssl._create_unverified_context df = pd.read_csv('/Users/pandas_sample/part3/auto-mpg.csv', header=None) df.columns = ['mpg','cylinders','displacement','horsepower','weight', 'acceleration','model year','origin','name'] # 첫 5줄 보기 print..
더보기
데이터프레임 -> 엑셀파일로 저장하기.
import pandas as pd import numpy as np import seaborn as sns import ssl from bs4 import BeautifulSoup import requests import re ssl._create_default_https_context = ssl._create_unverified_context # 판다스 DataFrame() 함수로 데이터프레임 변환. 변수 df1, df2에 저장 data1 = {'name' : [ 'Jerry', 'Riah', 'Paul'], 'algol' : [ "A", "A+", "B"], 'basic' : [ "C", "B", "B+"], 'c++' : [ "B+", "C", "C+"]} data2 = {'c0':[1,2,3],..
더보기