You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
154 lines
7.0 KiB
154 lines
7.0 KiB
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "markdown",
|
|
"source": [
|
|
"# Dữ liệu taxi NYC vào mùa đông và mùa hè\n",
|
|
"\n",
|
|
"Tham khảo [Data dictionary](https://www1.nyc.gov/assets/tlc/downloads/pdf/data_dictionary_trip_records_yellow.pdf) để tìm hiểu thêm về các cột đã được cung cấp.\n"
|
|
],
|
|
"metadata": {}
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"source": [
|
|
"#Install the pandas library\r\n",
|
|
"!pip install pandas"
|
|
],
|
|
"outputs": [],
|
|
"metadata": {
|
|
"scrolled": true
|
|
}
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 7,
|
|
"source": [
|
|
"import pandas as pd\r\n",
|
|
"\r\n",
|
|
"path = '../../data/taxi.csv'\r\n",
|
|
"\r\n",
|
|
"#Load the csv file into a dataframe\r\n",
|
|
"df = pd.read_csv(path)\r\n",
|
|
"\r\n",
|
|
"#Print the dataframe\r\n",
|
|
"print(df)\r\n"
|
|
],
|
|
"outputs": [
|
|
{
|
|
"output_type": "stream",
|
|
"name": "stdout",
|
|
"text": [
|
|
" VendorID tpep_pickup_datetime tpep_dropoff_datetime passenger_count \\\n",
|
|
"0 2.0 2019-07-15 16:27:53 2019-07-15 16:44:21 3.0 \n",
|
|
"1 2.0 2019-07-17 20:26:35 2019-07-17 20:40:09 6.0 \n",
|
|
"2 2.0 2019-07-06 16:01:08 2019-07-06 16:10:25 1.0 \n",
|
|
"3 1.0 2019-07-18 22:32:23 2019-07-18 22:35:08 1.0 \n",
|
|
"4 2.0 2019-07-19 14:54:29 2019-07-19 15:19:08 1.0 \n",
|
|
".. ... ... ... ... \n",
|
|
"195 2.0 2019-01-18 08:42:15 2019-01-18 08:56:57 1.0 \n",
|
|
"196 1.0 2019-01-19 04:34:45 2019-01-19 04:43:44 1.0 \n",
|
|
"197 2.0 2019-01-05 10:37:39 2019-01-05 10:42:03 1.0 \n",
|
|
"198 2.0 2019-01-23 10:36:29 2019-01-23 10:44:34 2.0 \n",
|
|
"199 2.0 2019-01-30 06:55:58 2019-01-30 07:07:02 5.0 \n",
|
|
"\n",
|
|
" trip_distance RatecodeID store_and_fwd_flag PULocationID DOLocationID \\\n",
|
|
"0 2.02 1.0 N 186 233 \n",
|
|
"1 1.59 1.0 N 141 161 \n",
|
|
"2 1.69 1.0 N 246 249 \n",
|
|
"3 0.90 1.0 N 229 141 \n",
|
|
"4 4.79 1.0 N 237 107 \n",
|
|
".. ... ... ... ... ... \n",
|
|
"195 1.18 1.0 N 43 237 \n",
|
|
"196 2.30 1.0 N 148 234 \n",
|
|
"197 0.83 1.0 N 237 263 \n",
|
|
"198 1.12 1.0 N 144 113 \n",
|
|
"199 2.41 1.0 N 209 107 \n",
|
|
"\n",
|
|
" payment_type fare_amount extra mta_tax tip_amount tolls_amount \\\n",
|
|
"0 1.0 12.0 1.0 0.5 4.08 0.0 \n",
|
|
"1 2.0 10.0 0.5 0.5 0.00 0.0 \n",
|
|
"2 2.0 8.5 0.0 0.5 0.00 0.0 \n",
|
|
"3 1.0 4.5 3.0 0.5 1.65 0.0 \n",
|
|
"4 1.0 19.5 0.0 0.5 5.70 0.0 \n",
|
|
".. ... ... ... ... ... ... \n",
|
|
"195 1.0 10.0 0.0 0.5 2.16 0.0 \n",
|
|
"196 1.0 9.5 0.5 0.5 2.15 0.0 \n",
|
|
"197 1.0 5.0 0.0 0.5 1.16 0.0 \n",
|
|
"198 2.0 7.0 0.0 0.5 0.00 0.0 \n",
|
|
"199 1.0 10.5 0.0 0.5 1.00 0.0 \n",
|
|
"\n",
|
|
" improvement_surcharge total_amount congestion_surcharge \n",
|
|
"0 0.3 20.38 2.5 \n",
|
|
"1 0.3 13.80 2.5 \n",
|
|
"2 0.3 11.80 2.5 \n",
|
|
"3 0.3 9.95 2.5 \n",
|
|
"4 0.3 28.50 2.5 \n",
|
|
".. ... ... ... \n",
|
|
"195 0.3 12.96 0.0 \n",
|
|
"196 0.3 12.95 0.0 \n",
|
|
"197 0.3 6.96 0.0 \n",
|
|
"198 0.3 7.80 0.0 \n",
|
|
"199 0.3 12.30 0.0 \n",
|
|
"\n",
|
|
"[200 rows x 18 columns]\n"
|
|
]
|
|
}
|
|
],
|
|
"metadata": {}
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"source": [
|
|
"# Sử dụng các ô dưới đây để thực hiện Phân tích Dữ liệu Khám phá của riêng bạn\n"
|
|
],
|
|
"metadata": {}
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"source": [],
|
|
"outputs": [],
|
|
"metadata": {}
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"\n---\n\n**Tuyên bố miễn trừ trách nhiệm**: \nTài liệu này đã được dịch bằng dịch vụ dịch thuật AI [Co-op Translator](https://github.com/Azure/co-op-translator). Mặc dù chúng tôi cố gắng đảm bảo độ chính xác, xin lưu ý rằng các bản dịch tự động có thể chứa lỗi hoặc không chính xác. Tài liệu gốc bằng ngôn ngữ bản địa nên được coi là nguồn tham khảo chính thức. Đối với các thông tin quan trọng, nên sử dụng dịch vụ dịch thuật chuyên nghiệp từ con người. Chúng tôi không chịu trách nhiệm cho bất kỳ sự hiểu lầm hoặc diễn giải sai nào phát sinh từ việc sử dụng bản dịch này.\n"
|
|
]
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"name": "python3",
|
|
"display_name": "Python 3.9.7 64-bit ('venv': venv)"
|
|
},
|
|
"language_info": {
|
|
"mimetype": "text/x-python",
|
|
"name": "python",
|
|
"pygments_lexer": "ipython3",
|
|
"codemirror_mode": {
|
|
"name": "ipython",
|
|
"version": 3
|
|
},
|
|
"version": "3.9.7",
|
|
"nbconvert_exporter": "python",
|
|
"file_extension": ".py"
|
|
},
|
|
"name": "04-nyc-taxi-join-weather-in-pandas",
|
|
"notebookId": 1709144033725344,
|
|
"interpreter": {
|
|
"hash": "6b9b57232c4b57163d057191678da2030059e733b8becc68f245de5a75abe84e"
|
|
},
|
|
"coopTranslator": {
|
|
"original_hash": "7bca1c1abc1e55842817b62e44e1a963",
|
|
"translation_date": "2025-09-02T08:33:52+00:00",
|
|
"source_file": "4-Data-Science-Lifecycle/15-analyzing/assignment.ipynb",
|
|
"language_code": "vi"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 2
|
|
} |