โหลดและสำรวจข้อมูล

Python สำหรับผู้ใช้ R

Daniel Chen

Instructor

ภาพรวม

  • เที่ยวบินในนิวยอร์ก ปี 2013
  • โหลดและสำรวจข้อมูล
  • จัดการและพล็อตกราฟ
Python สำหรับผู้ใช้ R

นำเข้าข้อมูลด้วย list comprehensions

  • ใช้ list comprehension เพื่อโหลดข้อมูล
  • ลดการพิมพ์ซ้ำ
  • วิธีกระชับในการเพิ่มค่าเข้าลิสต์
Python สำหรับผู้ใช้ R

List comprehensions

import glob
import pandas as pd
csv_files = glob.glob('*.csv')
csv_files
['data3.csv', 'data2.csv', 'data1.csv']
all_dfs = [pd.read_csv(x) for x in csv_files]
all_dfs[0]
    A   B   C   D
0  a0  b0  c0  d0
1  a1  b1  c1  d1
2  a2  b2  c2  d2
3  a3  b3  c3  d3
Python สำหรับผู้ใช้ R

มาฝึกกันเถอะ!

Python สำหรับผู้ใช้ R

Preparing Video For Download...