การวิเคราะห์กิจกรรมตำรวจด้วย pandas
Kevin Markham
Founder, Data School
ri.dtypes
stop_date object
stop_time object
driver_gender object
... ...
stop_duration object
drugs_related_stop bool
district object
object: Python strings (หรือออบเจกต์ Python อื่น ๆ)bool: ค่า True และ Falseint, float, datetime, categoryint, float: รองรับการดำเนินการทางคณิตศาสตร์datetime: รองรับ attribute และเมธอดด้านวันที่category: ใช้หน่วยความจำน้อยและทำงานเร็วกว่าbool: รองรับการดำเนินการเชิงตรรกะและคณิตศาสตร์apple
date time price
0 2/13/18 16:00 164.34
1 2/14/18 16:00 167.37
2 2/15/18 16:00 172.99
apple.price.dtype
dtype('O')
apple['price'] =
apple.price.astype('float')
apple.price.dtype
dtype('float64')
apple.priceapple['price']การวิเคราะห์กิจกรรมตำรวจด้วย pandas