본문 바로가기

분류 전체보기718

22.07.27 시간이 벌써 이렇게 지났네 데이터 사이언티스트가 되겠거니 하고 이쪽의 공부를 시작한것이 21년 10월 부터니깐 거의 9개월에서 10개월은 되는것 같다. 그동안에 많은 일들이 있었다. # 1 수학 중학교 1학년 1학기 수학부터 공부하느라 처음 3개월을 보냈고 수학을 하는 와중에도 지금생각해보면 중요한개념인 도형에 대해서 생략을 하고 공부를 하고도 3개월이 걸렸다는 점이 참 아쉬웠었다. 다행히도 지금은 대체안으로 수학을 학습할 방법을 찾았지만. 확실히 동양의 문화에서는 수학을 위한 수학으로써 기계적으로 받아들여야 하는 느낌이라면, 서양은 이 부분에 있어서 더 유연한 것같다. 그 측면에 있어서 수학을 사용하는 순수수학, 응용수학 그 어느분야에서도 동양이 서양을 이기는 비율은 현저히 낮다. 다행히도 영어를 좀 할줄 아는 것이 도움이 되어.. 2022. 7. 27.
pandas 판다스 기초 14 import excel # Importing From Excel Files with pd.read_excel() ## First Steps - NEW (from Pandas Version 0.24x) import pandas as pd sales = pd.read_excel('sales.xls') sales ''' Unnamed: 0CityCountrySalesBonus 0MikeNew YorkUSA252.50 1JimBostonUSA434.30 2StevenLondonUK767.60 3JoeMadridSpain121.80 4TomParisFrance8913.35 ''' # index_col을 통해서 엑셀을 열어봤을때 첫번째 컬럼을 열게된다. - index_col = 0 sales = pd.read_excel('sales.xl.. 2022. 7. 27.
pandas 판다스 기초 13 import CSV file # Importing CSV Files ## First Steps with open('titanic.csv') as f: text = f.readlines() text ''' ['survived,pclass,sex,age,sibsp,parch,fare,embarked,deck\n', '0,3,male,22.0,1,0,7.25,S,\n', '1,1,female,38.0,1,0,71.2833,C,C\n', '1,3,female,26.0,0,0,7.925,S,\n', '1,1,female,35.0,1,0,53.1,S,C\n', '0,3,male,35.0,0,0,8.05,S,\n', '0,3,male,,0,0,8.4583,Q,\n', ''' # 같은게 배열된다. len(text) # 892 # pandas의 r.. 2022. 7. 26.
pandas 틀린부분 복기 6 matplotlib # 문제1 # Create the graph below (lineplot for all numerical columns)! # subplots, sharex에 대한 기능이 생각이 안났었다. cars.plot(figsize = (14,10), subplots = True, sharex = False) plt.show() # 문제2 # Create the graph below (Scatterplot with horsepower and mpg)! Fill in the gaps! # 내 코드 cars.plot(kind = 'scatter', x = 'horsepower', y = 'mpg', figsize = (12,10), c = 'cylinders', marker = 'x', colormap = "virid.. 2022. 7. 26.