반응형
Notice
Recent Posts
Recent Comments
Link
관리 메뉴

bro's coding

pandas.basic 본문

[IT]/python.pandas

pandas.basic

givemebro 2020. 4. 6. 09:20
반응형
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt

CARD_SUBWAY_MONTH_201905.txt
1.16MB

 

data =pd.read_csv('CARD_SUBWAY_MONTH_201905.txt')

 

data.head(20)

 

data.tail()

 

data.info()

data.describe()

data.index

data.columns

data['사용일자']
data.사용일자
# 같은 표현

data2=data[['승차총승객수','하차총승객수']]
data2

data2.values
# pandas ->numpy

data[data.승차총승객수<10]

data[data.사용일자==20190501]

len(data[data.사용일자==20190501])
#593
data[data.사용일자==20190501].shape
#(593, 7)​
[[day, data[data.사용일자==day].shape[0]] for day in range(20190501,20190532)]

{day: data[data.사용일자==day].shape[0] for day in range(20190501,20190532)}

 

data.isnull()
#data.notnull()

data.isnull().sum()

반응형

'[IT] > python.pandas' 카테고리의 다른 글

pandas.value_count  (0) 2020.04.06
pandas.카테고리 알기  (0) 2020.04.06
pandas.corr, cov(상관 관계)  (0) 2020.04.06
pandas.데이터 다루기  (0) 2020.04.06
pandas.dt(날짜 다루기)  (0) 2020.04.06
pandas.개념  (0) 2020.04.03
pandas.ndarray 다루기  (0) 2020.03.26
pandas.file open(csv)  (0) 2020.03.26
Comments