change to window mode and add data to database

This commit is contained in:
kicap 2024-06-10 13:47:41 +08:00
parent 4e566b2b80
commit 4e8be02953
8 changed files with 1152 additions and 687 deletions

BIN
.DS_Store vendored

Binary file not shown.

2
.gitignore vendored
View File

@ -4,3 +4,5 @@
/video*
/inference/
/video/
.env

View File

@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 5,
"id": "f90cb956-250b-454e-855e-fefcd0ff880a",
"metadata": {},
"outputs": [],
@ -12,7 +12,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 6,
"id": "93b77493-0a01-4421-b2a0-380991740ff6",
"metadata": {},
"outputs": [],
@ -28,7 +28,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 7,
"id": "8d8696ea-4af1-4aa9-96cb-ff4538242ab5",
"metadata": {},
"outputs": [],
@ -38,7 +38,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 8,
"id": "80b4ff7c-1f3b-4e1d-896c-d88c0966f33e",
"metadata": {},
"outputs": [
@ -46,12 +46,12 @@
"name": "stdout",
"output_type": "stream",
"text": [
"3467.0 30.036135194663093 848 478\n"
"6868.0 30.03550936578534 848 478\n"
]
}
],
"source": [
"cap = cv2.VideoCapture('video/malam.mp4')\n",
"cap = cv2.VideoCapture('video/video.mp4')\n",
"frames_count, fps, width, height = cap.get(cv2.CAP_PROP_FRAME_COUNT), cap.get(cv2.CAP_PROP_FPS), cap.get(\n",
" cv2.CAP_PROP_FRAME_WIDTH), cap.get(cv2.CAP_PROP_FRAME_HEIGHT)\n",
"width = int(width)\n",
@ -81,7 +81,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 9,
"id": "1c2cd208-3d36-4e1d-9376-5e1d223bd021",
"metadata": {},
"outputs": [],
@ -94,7 +94,174 @@
"execution_count": null,
"id": "1c53be2e-1fc0-46af-b8dd-84cd6b1dffdb",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_14225/2028242834.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n"
]
}
],
"source": [
"while True:\n",
"\n",
@ -364,8 +531,8 @@
" + ' detik', (0, 60), cv2.FONT_HERSHEY_SIMPLEX, .6, (255, 255, 0), 1)\n",
"\n",
" # menampilkan images dan transformasi\n",
" cv2.imshow(\"Output\", image)\n",
" cv2.moveWindow(\"Output\", 0, 0)\n",
" cv2.imshow(\"Input\", frame)\n",
" cv2.moveWindow(\"Input\", 0, 0)\n",
"\n",
" cv2.imshow(\"gray\", gray)\n",
" cv2.moveWindow(\"gray\", int(width * ratio), 0)\n",
@ -373,6 +540,9 @@
" cv2.imshow(\"closing\", closing)\n",
" cv2.moveWindow(\"closing\", width, 0)\n",
"\n",
" cv2.imshow(\"Output\", image)\n",
" cv2.moveWindow(\"Output\", 0, 0)\n",
"\n",
" # cv2.imshow(\"opening\", opening)\n",
" # cv2.moveWindow(\"opening\", 0, int(height * ratio))\n",
"\n",

View File

@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 1,
"id": "f90cb956-250b-454e-855e-fefcd0ff880a",
"metadata": {},
"outputs": [],
@ -12,7 +12,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 2,
"id": "93b77493-0a01-4421-b2a0-380991740ff6",
"metadata": {},
"outputs": [],
@ -28,7 +28,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 3,
"id": "8d8696ea-4af1-4aa9-96cb-ff4538242ab5",
"metadata": {},
"outputs": [],
@ -38,7 +38,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 4,
"id": "80b4ff7c-1f3b-4e1d-896c-d88c0966f33e",
"metadata": {},
"outputs": [
@ -46,12 +46,12 @@
"name": "stdout",
"output_type": "stream",
"text": [
"3467.0 30.036135194663093 848 478\n"
"6868.0 30.03550936578534 848 478\n"
]
}
],
"source": [
"cap = cv2.VideoCapture('video/malam.mp4')\n",
"cap = cv2.VideoCapture('video/video.mp4')\n",
"frames_count, fps, width, height = cap.get(cv2.CAP_PROP_FRAME_COUNT), cap.get(cv2.CAP_PROP_FPS), cap.get(\n",
" cv2.CAP_PROP_FRAME_WIDTH), cap.get(cv2.CAP_PROP_FRAME_HEIGHT)\n",
"width = int(width)\n",
@ -81,7 +81,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 5,
"id": "1c2cd208-3d36-4e1d-9376-5e1d223bd021",
"metadata": {},
"outputs": [],
@ -91,494 +91,10 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": null,
"id": "1c53be2e-1fc0-46af-b8dd-84cd6b1dffdb",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:178: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n",
"/var/folders/9r/fngx7sv11bl1k4rvtyflv1pw0000gn/T/ipykernel_65183/953859291.py:168: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
" df[str(totalcars)] = \"\" # membuat kolom baru untuk mobil baru yang tercatat\n"
]
},
{
"ename": "KeyboardInterrupt",
"evalue": "",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[18], line 123\u001b[0m\n\u001b[1;32m 120\u001b[0m oldcxcy \u001b[38;5;241m=\u001b[39m df\u001b[38;5;241m.\u001b[39miloc[\u001b[38;5;28mint\u001b[39m(framenumber \u001b[38;5;241m-\u001b[39m \u001b[38;5;241m1\u001b[39m)][\u001b[38;5;28mstr\u001b[39m(carids[j])]\n\u001b[1;32m 122\u001b[0m \u001b[38;5;66;03m# mengambil centroid dari frame sekarang yang tidak selalu sesuai dengan centroid dari frame sebelumnya\u001b[39;00m\n\u001b[0;32m--> 123\u001b[0m curcxcy \u001b[38;5;241m=\u001b[39m \u001b[43mnp\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43marray\u001b[49m\u001b[43m(\u001b[49m\u001b[43m[\u001b[49m\u001b[43mcxx\u001b[49m\u001b[43m[\u001b[49m\u001b[43mi\u001b[49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mcyy\u001b[49m\u001b[43m[\u001b[49m\u001b[43mi\u001b[49m\u001b[43m]\u001b[49m\u001b[43m]\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 125\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m oldcxcy: \u001b[38;5;66;03m# jika centroid dari frame sebelumnya kosong karena mobil keluar layar\u001b[39;00m\n\u001b[1;32m 127\u001b[0m \u001b[38;5;28;01mcontinue\u001b[39;00m \u001b[38;5;66;03m# lanjutkan ke id mobil selanjutnya\u001b[39;00m\n",
"\u001b[0;31mKeyboardInterrupt\u001b[0m: "
]
}
],
"outputs": [],
"source": [
"while True:\n",
"\n",
@ -847,16 +363,23 @@
" cv2.putText(image, 'Waktu: ' + str(round(framenumber / fps, 2)) + ' detik dari ' + str(round(frames_count / fps, 2))\n",
" + ' detik', (0, 60), cv2.FONT_HERSHEY_SIMPLEX, .6, (255, 255, 0), 1)\n",
"\n",
" # menampilkan images dan transformasi\n",
" cv2.imshow(\"Output\", image)\n",
" cv2.moveWindow(\"Output\", 0, 0)\n",
" # make them view side by side\n",
"\n",
" # make this view resize same as \n",
" # ratio = height / 640\n",
" frame = cv2.resize(frame, (int(width * ratio), int(height * ratio)))\n",
" cv2.imshow(\"Input\", frame)\n",
" cv2.moveWindow(\"Input\", 0, 0)\n",
"\n",
" cv2.imshow(\"gray\", gray)\n",
" cv2.moveWindow(\"gray\", int(width * ratio), 0)\n",
"\n",
" cv2.imshow(\"closing\", closing)\n",
" cv2.imshow(\"closing\", bins)\n",
" cv2.moveWindow(\"closing\", width, 0)\n",
"\n",
" cv2.imshow(\"Output\", image)\n",
" cv2.moveWindow(\"Output\", width, int(height * ratio))\n",
"\n",
" # cv2.imshow(\"opening\", opening)\n",
" # cv2.moveWindow(\"opening\", 0, int(height * ratio))\n",
"\n",

255
app.py
View File

@ -1,145 +1,66 @@
from flask import Flask, render_template, Response, request,jsonify,send_from_directory
from quart import Quart, render_template, Response, request,jsonify,send_from_directory
import cv2
import imutils
import numpy as np
from ultralytics import YOLO
from collections import defaultdict
import aiomysql
from dotenv import load_dotenv
import os
import pandas as pd
import asyncio
import time
app = Flask(__name__, static_folder='assets')
app = Quart(__name__, static_folder='assets')
video_list = []
# color = (0, 255, 0)
# color_red = (0, 0, 255)
# thickness = 2
# font = cv2.FONT_HERSHEY_SIMPLEX
# font_scale = 0.5
# # Background subtraction menggunakan MOG2
# subtracao = cv2.createBackgroundSubtractorMOG2()
cap = None
jumlah_kenderaan = 0
kenderaan_kiri = 0
kenderaan_kanan = 0
MYSQL_HOST = os.getenv('MYSQL_HOST')
MYSQL_USER = os.getenv('MYSQL_USER')
MYSQL_PASSWORD = os.getenv('MYSQL_PASSWORD')
MYSQL_DB = os.getenv('MYSQL_DB')
async def get_db_connection():
return await aiomysql.connect(
host=MYSQL_HOST,
user=MYSQL_USER,
password=MYSQL_PASSWORD,
db=MYSQL_DB,
loop=asyncio.get_running_loop()
)
async def insert_data(nama, waktu,waktu_sekarang ,kenderaan_kiri, kenderaan_kanan,status):
# get the datetime
now = time.strftime("%Y-%m-%d %H:%M:%S")
conn = await get_db_connection()
async with conn.cursor() as cursor:
# check if data already exists
sql = "SELECT * FROM tb_data WHERE nama = %s"
await cursor.execute(sql, (nama,))
result = await cursor.fetchone()
if result:
# update existing data
sql = "UPDATE tb_data SET waktu = %s, waktu_sekarang = %s, kenderaan_kiri = %s, kenderaan_kanan = %s , updated_at = %s , status = %s WHERE nama = %s"
await cursor.execute(sql, (waktu, waktu_sekarang, kenderaan_kiri, kenderaan_kanan, now, status, nama))
else:
# insert new data
sql = "INSERT INTO tb_data (nama, waktu, waktu_sekarang, kenderaan_kiri, kenderaan_kanan) VALUES (%s, %s, %s, %s, %s)"
await cursor.execute(sql, (nama, waktu, waktu_sekarang, kenderaan_kiri, kenderaan_kanan))
await conn.commit()
conn.close()
# Define the generate_frames function with parameters for video, threshold, and state
# def generate_frames(video, threshold, stat):
# model_path = "models/yolov8n.pt"
# cap = cv2.VideoCapture(video)
# model = YOLO(model_path)
# vehicle_ids = [2, 3, 5, 7]
# track_history = defaultdict(lambda: [])
# up = {}
# down = {}
# global jumlah_kenderaan
# global kenderaan_kiri
# global kenderaan_kanan
# jumlah_kenderaan = 0
# kenderaan_kiri = 0
# kenderaan_kanan = 0
# while True:
# ret, frame = cap.read()
# if not ret:
# break
# try:
# frame = imutils.resize(frame, width=1280, height=720)
# # freame_original = frame.copy()
# frame_color = frame.copy()
# frame_gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
# frame_gray = cv2.cvtColor(frame_gray, cv2.COLOR_GRAY2BGR)
# frame_bw = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
# results = model.track(frame_color, persist=True, verbose=False)[0]
# bboxes = np.array(results.boxes.data.tolist(), dtype="int")
# # Gambar garis pembatas untuk menghitung jumlah kendaraan yang melewati garis
# cv2.line(frame_color, (0, threshold), (1280, threshold), color, thickness)
# text_position = (620, threshold - 5) # Adjust the Y coordinate to place the text just above the line
# cv2.putText(frame_color, "Pembatas Jalan", text_position, font, 0.7, color_red, thickness)
# for box in bboxes:
# x1, y1, x2, y2, track_id, score, class_id = box
# cx = int((x1 + x2) / 2)
# cy = int((y1 + y2) / 2)
# if class_id in vehicle_ids:
# class_name = results.names[int(class_id)].upper()
# track = track_history[track_id]
# track.append((cx, cy))
# if len(track) > 20:
# track.pop(0)
# points = np.hstack(track).astype("int32").reshape(-1, 1, 2)
# cv2.polylines(frame_color, [points], isClosed=False, color=color, thickness=thickness)
# cv2.rectangle(frame_color, (x1, y1), (x2, y2), color, thickness)
# text = "ID: {} {}".format(track_id, class_name)
# cv2.putText(frame_color, text, (x1, y1 - 5), font, font_scale, color, thickness)
# if cy > threshold - 5 and cy < threshold + 5 and cx < 670:
# down[track_id] = x1, y1, x2, y2
# if cy > threshold - 5 and cy < threshold + 5 and cx > 670:
# up[track_id] = x1, y1, x2, y2
# up_text = "Kanan:{}".format(len(list(up.keys())))
# down_text = "Kiri:{}".format(len(list(down.keys())))
# kenderaan_kanan = len(list(up.keys()))
# kenderaan_kiri = len(list(down.keys()))
# cv2.putText(frame_color, up_text, (1150, threshold - 5), font, 0.8, color_red, thickness)
# cv2.putText(frame_color, down_text, (0, threshold - 5), font, 0.8, color_red, thickness)
# # Background subtraction dan deteksi kontur
# grey = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) # Konversi frame ke citra grayscale
# blur = cv2.GaussianBlur(grey, (3, 3), 5) # Reduksi noise menggunakan Gaussian Blur
# img_sub = subtracao.apply(blur) # Background subtraction
# dilat = cv2.dilate(img_sub, np.ones((5, 5))) # Dilasi untuk meningkatkan ketebalan objek
# kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (5, 5)) # Kernel untuk operasi morfologi
# dilatada = cv2.morphologyEx(dilat, cv2.MORPH_CLOSE, kernel) # Operasi closing untuk mengisi lubang kecil pada objek
# dilatada = cv2.morphologyEx(dilatada, cv2.MORPH_CLOSE, kernel) # Operasi closing tambahan
# contorno, h = cv2.findContours(dilatada, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE) # Deteksi kontur objek
# frame_bw = cv2.cvtColor(dilatada, cv2.COLOR_GRAY2BGR) # Konversi frame grayscale ke BGR
# if stat == 'color':
# frame_to_encode = frame_color
# elif stat == 'grayscale':
# frame_to_encode = frame_gray
# elif stat == 'original':
# frame_to_encode = frame
# else: # Assuming 'detectar' state
# frame_to_encode = frame_bw
# _, buffer = cv2.imencode('.jpg', frame_to_encode)
# frame_bytes = buffer.tobytes()
# yield (b'--frame\r\n'
# b'Content-Type: image/jpeg\r\n\r\n' + frame_bytes + b'\r\n')
# except Exception as e:
# print("Terjadi kesalahan:", str(e))
# continue
# jumlah_kenderaan = kenderaan_kiri + kenderaan_kanan
# cap.release()
def generate_frames2(video, threshold,stat):
async def generate_frames2(video, threshold,stat):
global jumlah_kenderaan
global kenderaan_kiri
global kenderaan_kanan
global cap
jumlah_kenderaan = 0
kenderaan_kiri = 0
@ -421,6 +342,9 @@ def generate_frames2(video, threshold,stat):
# Top left hand corner on-screen text
#cv2.rectangle(image, (0, 0), (250, 100), (255, 0, 0), -1) # background rectangle for on-screen text
# insert data to database here using asyncio
await insert_data(video, str(round(frames_count / fps, 2)), str(round(framenumber / fps, 2)), kenderaan_kiri, kenderaan_kanan, "Belum Selesai")
cv2.putText(image, "Kenderaan Sebelah Kiri: " + str(carscrossedup), (0, 20), cv2.FONT_HERSHEY_SIMPLEX, .7, (255,255,255),
4)
@ -437,59 +361,34 @@ def generate_frames2(video, threshold,stat):
+ ' detik', (0, 75), cv2.FONT_HERSHEY_SIMPLEX, .5, (255,255,255), 1)
frame = cv2.resize(frame, (int(width * ratio), int(height * ratio)))
cv2.imshow("Input", frame)
cv2.moveWindow("Input", 0, 0)
cv2.imshow("gray", gray)
cv2.moveWindow("gray", int(width * ratio), 0)
cv2.imshow("closing", bins)
cv2.moveWindow("closing", width, 0)
cv2.imshow("Output", image)
cv2.moveWindow("Output", width, int(height * ratio))
# displays images and transformations and resize to 1280x720
# cv2.imshow("countours", image)
# cv2.moveWindow("countours", 0, 0)
if stat == 'color':
# frame_to_encode = frame
# resize to 1280x720
frame_to_encode = cv2.resize(image, (1280, 720))
# cv2.imshow("fgmask", fgmask)
# cv2.moveWindow("fgmask", int(width * ratio), 0)
elif stat == 'grayscale':
# frame_to_encode = gray
frame_to_encode = cv2.resize(gray, (1280, 720))
# cv2.imshow("closing", closing)
# cv2.moveWindow("closing", width, 0)
elif stat == 'detectar':
# frame_to_encode = closing
frame_to_encode = cv2.resize(bins, (1280, 720))
else :
# frame_to_encode = opening
frame_to_encode = cv2.resize(frame, (1280, 720))
_, buffer = cv2.imencode('.jpg', frame_to_encode)
frame_bytes = buffer.tobytes()
yield (b'--frame\r\n'
b'Content-Type: image/jpeg\r\n\r\n' + frame_bytes + b'\r\n')
# cv2.imshow("opening", opening)
# cv2.moveWindow("opening", 0, int(height * ratio))
# cv2.imshow("dilation", dilation)
# cv2.moveWindow("dilation", int(width * ratio), int(height * ratio))
# cv2.imshow("binary", bins)
# cv2.moveWindow("binary", width, int(height * ratio))
# video.write(image) # save the current image to video file from earlier
# adds to framecount
framenumber = framenumber + 1
k = cv2.waitKey(int(1000/fps)) & 0xff # int(1000/fps) is normal speed since waitkey is in ms
if k == 27:
await insert_data(video, str(round(frames_count / fps, 2)), str(round(framenumber / fps, 2)),kenderaan_kiri, kenderaan_kanan, "Belum Selesai")
cap.release()
cv2.destroyAllWindows()
break
else: # if video is finished then break loop
await insert_data(video, str(round(frames_count / fps, 2)),str(round(framenumber / fps, 2)), kenderaan_kiri, kenderaan_kanan, "Selesai")
cap.release()
cv2.destroyAllWindows()
break
cap.release()
@ -503,38 +402,44 @@ def update_video_list():
video_list = [f"video/{f}" for f in os.listdir("video") if f.endswith(".mp4")]
@app.route('/')
def index():
async def index():
if (cap != None):
cap.release()
cv2.destroyAllWindows()
update_video_list()
print("video_list:", video_list)
video = request.args.get('video', 'video/video.mp4')
threshold = int(request.args.get('threshold', 450))
the_threshold = request.args.get('threshold', 450)
threshold = int(the_threshold)
# Pass the video file path and threshold value to the template
return render_template('index.html', video=video, threshold=threshold, video_list=video_list)
return await render_template('index2.html', video=video, threshold=threshold, video_list=video_list)
def video_feed():
async def video_feed():
# Get the video file path, threshold value, and state from the URL parameters
video = request.args.get('video')
threshold = int(request.args.get('threshold', 450))
the_threshold = request.args.get('threshold', 450)
threshold = int(the_threshold)
stat = request.args.get('stat', 'color') # Default to 'color' if state is not specified
# Return the response with the generator function
print("ini semua variable:", video, threshold, stat)
return Response(generate_frames2(video, threshold, stat), mimetype='multipart/x-mixed-replace; boundary=frame')
await generate_frames2(video, threshold, stat)
# return Response( generate_frames2(video, threshold, stat), mimetype='multipart/x-mixed-replace; boundary=frame')
@app.route('/video_list')
def video_list():
async def video_list():
update_video_list()
return render_template('video_list.html', video_list=video_list)
@app.route('/videos/<path:video>')
def video(video):
async def video(video):
return send_from_directory('', video)
# Add route for the video feed
app.add_url_rule('/video_feed', 'video_feed', video_feed)
@app.route('/check_jumlah_kenderaan', methods=['GET'])
def check_jumlah_kenderaan():
async def check_jumlah_kenderaan():
global jumlah_kenderaan
global kenderaan_kiri
global kenderaan_kanan
@ -542,7 +447,7 @@ def check_jumlah_kenderaan():
UPLOAD_FOLDER = 'video'
@app.route('/upload', methods=['POST'])
def upload_file():
async def upload_file():
file = request.files['file']
if file.filename == '':

557
app_before.py Normal file
View File

@ -0,0 +1,557 @@
from flask import Flask, render_template, Response, request,jsonify,send_from_directory
import cv2
import imutils
import numpy as np
from ultralytics import YOLO
from collections import defaultdict
import os
import pandas as pd
app = Flask(__name__, static_folder='assets')
video_list = []
# color = (0, 255, 0)
# color_red = (0, 0, 255)
# thickness = 2
# font = cv2.FONT_HERSHEY_SIMPLEX
# font_scale = 0.5
# # Background subtraction menggunakan MOG2
# subtracao = cv2.createBackgroundSubtractorMOG2()
jumlah_kenderaan = 0
kenderaan_kiri = 0
kenderaan_kanan = 0
# Define the generate_frames function with parameters for video, threshold, and state
# def generate_frames(video, threshold, stat):
# model_path = "models/yolov8n.pt"
# cap = cv2.VideoCapture(video)
# model = YOLO(model_path)
# vehicle_ids = [2, 3, 5, 7]
# track_history = defaultdict(lambda: [])
# up = {}
# down = {}
# global jumlah_kenderaan
# global kenderaan_kiri
# global kenderaan_kanan
# jumlah_kenderaan = 0
# kenderaan_kiri = 0
# kenderaan_kanan = 0
# while True:
# ret, frame = cap.read()
# if not ret:
# break
# try:
# frame = imutils.resize(frame, width=1280, height=720)
# # freame_original = frame.copy()
# frame_color = frame.copy()
# frame_gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
# frame_gray = cv2.cvtColor(frame_gray, cv2.COLOR_GRAY2BGR)
# frame_bw = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
# results = model.track(frame_color, persist=True, verbose=False)[0]
# bboxes = np.array(results.boxes.data.tolist(), dtype="int")
# # Gambar garis pembatas untuk menghitung jumlah kendaraan yang melewati garis
# cv2.line(frame_color, (0, threshold), (1280, threshold), color, thickness)
# text_position = (620, threshold - 5) # Adjust the Y coordinate to place the text just above the line
# cv2.putText(frame_color, "Pembatas Jalan", text_position, font, 0.7, color_red, thickness)
# for box in bboxes:
# x1, y1, x2, y2, track_id, score, class_id = box
# cx = int((x1 + x2) / 2)
# cy = int((y1 + y2) / 2)
# if class_id in vehicle_ids:
# class_name = results.names[int(class_id)].upper()
# track = track_history[track_id]
# track.append((cx, cy))
# if len(track) > 20:
# track.pop(0)
# points = np.hstack(track).astype("int32").reshape(-1, 1, 2)
# cv2.polylines(frame_color, [points], isClosed=False, color=color, thickness=thickness)
# cv2.rectangle(frame_color, (x1, y1), (x2, y2), color, thickness)
# text = "ID: {} {}".format(track_id, class_name)
# cv2.putText(frame_color, text, (x1, y1 - 5), font, font_scale, color, thickness)
# if cy > threshold - 5 and cy < threshold + 5 and cx < 670:
# down[track_id] = x1, y1, x2, y2
# if cy > threshold - 5 and cy < threshold + 5 and cx > 670:
# up[track_id] = x1, y1, x2, y2
# up_text = "Kanan:{}".format(len(list(up.keys())))
# down_text = "Kiri:{}".format(len(list(down.keys())))
# kenderaan_kanan = len(list(up.keys()))
# kenderaan_kiri = len(list(down.keys()))
# cv2.putText(frame_color, up_text, (1150, threshold - 5), font, 0.8, color_red, thickness)
# cv2.putText(frame_color, down_text, (0, threshold - 5), font, 0.8, color_red, thickness)
# # Background subtraction dan deteksi kontur
# grey = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) # Konversi frame ke citra grayscale
# blur = cv2.GaussianBlur(grey, (3, 3), 5) # Reduksi noise menggunakan Gaussian Blur
# img_sub = subtracao.apply(blur) # Background subtraction
# dilat = cv2.dilate(img_sub, np.ones((5, 5))) # Dilasi untuk meningkatkan ketebalan objek
# kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (5, 5)) # Kernel untuk operasi morfologi
# dilatada = cv2.morphologyEx(dilat, cv2.MORPH_CLOSE, kernel) # Operasi closing untuk mengisi lubang kecil pada objek
# dilatada = cv2.morphologyEx(dilatada, cv2.MORPH_CLOSE, kernel) # Operasi closing tambahan
# contorno, h = cv2.findContours(dilatada, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE) # Deteksi kontur objek
# frame_bw = cv2.cvtColor(dilatada, cv2.COLOR_GRAY2BGR) # Konversi frame grayscale ke BGR
# if stat == 'color':
# frame_to_encode = frame_color
# elif stat == 'grayscale':
# frame_to_encode = frame_gray
# elif stat == 'original':
# frame_to_encode = frame
# else: # Assuming 'detectar' state
# frame_to_encode = frame_bw
# _, buffer = cv2.imencode('.jpg', frame_to_encode)
# frame_bytes = buffer.tobytes()
# yield (b'--frame\r\n'
# b'Content-Type: image/jpeg\r\n\r\n' + frame_bytes + b'\r\n')
# except Exception as e:
# print("Terjadi kesalahan:", str(e))
# continue
# jumlah_kenderaan = kenderaan_kiri + kenderaan_kanan
# cap.release()
def generate_frames2(video, threshold,stat):
global jumlah_kenderaan
global kenderaan_kiri
global kenderaan_kanan
jumlah_kenderaan = 0
kenderaan_kiri = 0
kenderaan_kanan = 0
cap = cv2.VideoCapture(video)
frames_count, fps, width, height = cap.get(cv2.CAP_PROP_FRAME_COUNT), cap.get(cv2.CAP_PROP_FPS), cap.get(
cv2.CAP_PROP_FRAME_WIDTH), cap.get(cv2.CAP_PROP_FRAME_HEIGHT)
width = int(width)
height = int(height)
print(frames_count, fps, width, height)
# creates a pandas data frame with the number of rows the same length as frame count
df = pd.DataFrame(index=range(int(frames_count)))
df.index.name = "Frames"
framenumber = 0 # keeps track of current frame
carscrossedup = 0 # keeps track of cars that crossed up
carscrosseddown = 0 # keeps track of cars that crossed down
carids = [] # blank list to add car ids
caridscrossed = [] # blank list to add car ids that have crossed
totalcars = 0 # keeps track of total cars
fgbg = cv2.createBackgroundSubtractorMOG2() # create background subtractor
# information to start saving a video file
ret, frame = cap.read() # import image
ratio = .5 # resize ratio
image = cv2.resize(frame, (0, 0), None, ratio, ratio) # resize image
width2, height2, channels = image.shape
# video = cv2.VideoWriter('traffic_counter.avi', cv2.VideoWriter_fourcc('M', 'J', 'P', 'G'), fps, (height2, width2), 1)
while True:
ret, frame = cap.read() # import image
if ret: # if there is a frame continue with code
image = cv2.resize(frame, (0, 0), None, ratio, ratio) # resize image
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) # converts image to gray
fgmask = fgbg.apply(gray) # uses the background subtraction
# applies different thresholds to fgmask to try and isolate cars
# just have to keep playing around with settings until cars are easily identifiable
kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (5, 5)) # kernel to apply to the morphology
closing = cv2.morphologyEx(fgmask, cv2.MORPH_CLOSE, kernel)
opening = cv2.morphologyEx(closing, cv2.MORPH_OPEN, kernel)
dilation = cv2.dilate(opening, kernel)
retvalbin, bins = cv2.threshold(dilation, 220, 255, cv2.THRESH_BINARY) # removes the shadows
# creates contours
contours, hierarchy = cv2.findContours(bins, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)[-2:]
# use convex hull to create polygon around contours
hull = [cv2.convexHull(c) for c in contours]
# draw contours
# cv2.drawContours(image, hull, -1, (0, 255, 0), 3)
# line created to stop counting contours, needed as cars in distance become one big contour
lineypos = 125
# cv2.line(image, (0, lineypos), (width, lineypos), (255, 0, 0), 5)
# line y position created to count contours
lineypos2 = 150
cv2.line(image, (0, lineypos2), (width, lineypos2), (0, 255, 0), 5)
# min area for contours in case a bunch of small noise contours are created
minarea = 175
# max area for contours, can be quite large for buses
maxarea = 50000
# vectors for the x and y locations of contour centroids in current frame
cxx = np.zeros(len(contours))
cyy = np.zeros(len(contours))
for i in range(len(contours)): # cycles through all contours in current frame
if hierarchy[0, i, 3] == -1: # using hierarchy to only count parent contours (contours not within others)
area = cv2.contourArea(contours[i]) # area of contour
if minarea < area < maxarea: # area threshold for contour
# calculating centroids of contours
cnt = contours[i]
M = cv2.moments(cnt)
cx = int(M['m10'] / M['m00'])
cy = int(M['m01'] / M['m00'])
if cy > lineypos: # filters out contours that are above line (y starts at top)
# gets bounding points of contour to create rectangle
# x,y is top left corner and w,h is width and height
x, y, w, h = cv2.boundingRect(cnt)
# creates a rectangle around contour
cv2.rectangle(image, (x, y), (x + w, y + h), (255, 0, 0), 2)
# Prints centroid text in order to double check later on
cv2.putText(image, str(cx) + "," + str(cy), (cx + 10, cy + 10), cv2.FONT_HERSHEY_SIMPLEX,
.3, (0, 0, 255), 1)
cv2.drawMarker(image, (cx, cy), (0, 0, 255), cv2.MARKER_STAR, markerSize=5, thickness=1,
line_type=cv2.LINE_AA)
# adds centroids that passed previous criteria to centroid list
cxx[i] = cx
cyy[i] = cy
# eliminates zero entries (centroids that were not added)
cxx = cxx[cxx != 0]
cyy = cyy[cyy != 0]
# empty list to later check which centroid indices were added to dataframe
minx_index2 = []
miny_index2 = []
# maximum allowable radius for current frame centroid to be considered the same centroid from previous frame
maxrad = 25
# The section below keeps track of the centroids and assigns them to old carids or new carids
if len(cxx): # if there are centroids in the specified area
if not carids: # if carids is empty
for i in range(len(cxx)): # loops through all centroids
carids.append(i) # adds a car id to the empty list carids
df[str(carids[i])] = "" # adds a column to the dataframe corresponding to a carid
# assigns the centroid values to the current frame (row) and carid (column)
df.at[int(framenumber), str(carids[i])] = [cxx[i], cyy[i]]
totalcars = carids[i] + 1 # adds one count to total cars
else: # if there are already car ids
dx = np.zeros((len(cxx), len(carids))) # new arrays to calculate deltas
dy = np.zeros((len(cyy), len(carids))) # new arrays to calculate deltas
for i in range(len(cxx)): # loops through all centroids
for j in range(len(carids)): # loops through all recorded car ids
# acquires centroid from previous frame for specific carid
oldcxcy = df.iloc[int(framenumber - 1)][str(carids[j])]
# acquires current frame centroid that doesn't necessarily line up with previous frame centroid
curcxcy = np.array([cxx[i], cyy[i]])
if not oldcxcy: # checks if old centroid is empty in case car leaves screen and new car shows
continue # continue to next carid
else: # calculate centroid deltas to compare to current frame position later
dx[i, j] = oldcxcy[0] - curcxcy[0]
dy[i, j] = oldcxcy[1] - curcxcy[1]
for j in range(len(carids)): # loops through all current car ids
sumsum = np.abs(dx[:, j]) + np.abs(dy[:, j]) # sums the deltas wrt to car ids
# finds which index carid had the min difference and this is true index
correctindextrue = np.argmin(np.abs(sumsum))
minx_index = correctindextrue
miny_index = correctindextrue
# acquires delta values of the minimum deltas in order to check if it is within radius later on
mindx = dx[minx_index, j]
mindy = dy[miny_index, j]
if mindx == 0 and mindy == 0 and np.all(dx[:, j] == 0) and np.all(dy[:, j] == 0):
# checks if minimum value is 0 and checks if all deltas are zero since this is empty set
# delta could be zero if centroid didn't move
continue # continue to next carid
else:
# if delta values are less than maximum radius then add that centroid to that specific carid
if np.abs(mindx) < maxrad and np.abs(mindy) < maxrad:
# adds centroid to corresponding previously existing carid
df.at[int(framenumber), str(carids[j])] = [cxx[minx_index], cyy[miny_index]]
minx_index2.append(minx_index) # appends all the indices that were added to previous carids
miny_index2.append(miny_index)
for i in range(len(cxx)): # loops through all centroids
# if centroid is not in the minindex list then another car needs to be added
if i not in minx_index2 and miny_index2:
df[str(totalcars)] = "" # create another column with total cars
totalcars = totalcars + 1 # adds another total car the count
t = totalcars - 1 # t is a placeholder to total cars
carids.append(t) # append to list of car ids
df.at[int(framenumber), str(t)] = [cxx[i], cyy[i]] # add centroid to the new car id
elif curcxcy[0] and not oldcxcy and not minx_index2 and not miny_index2:
# checks if current centroid exists but previous centroid does not
# new car to be added in case minx_index2 is empty
df[str(totalcars)] = "" # create another column with total cars
totalcars = totalcars + 1 # adds another total car the count
t = totalcars - 1 # t is a placeholder to total cars
carids.append(t) # append to list of car ids
df.at[int(framenumber), str(t)] = [cxx[i], cyy[i]] # add centroid to the new car id
# The section below labels the centroids on screen
currentcars = 0 # current cars on screen
currentcarsindex = [] # current cars on screen carid index
for i in range(len(carids)): # loops through all carids
if df.at[int(framenumber), str(carids[i])] != '':
# checks the current frame to see which car ids are active
# by checking in centroid exists on current frame for certain car id
currentcars = currentcars + 1 # adds another to current cars on screen
currentcarsindex.append(i) # adds car ids to current cars on screen
for i in range(currentcars): # loops through all current car ids on screen
# grabs centroid of certain carid for current frame
curcent = df.iloc[int(framenumber)][str(carids[currentcarsindex[i]])]
# grabs centroid of certain carid for previous frame
oldcent = df.iloc[int(framenumber - 1)][str(carids[currentcarsindex[i]])]
if curcent: # if there is a current centroid
# On-screen text for current centroid
cv2.putText(image, "Centroid" + str(curcent[0]) + "," + str(curcent[1]),
(int(curcent[0]), int(curcent[1])), cv2.FONT_HERSHEY_SIMPLEX, .5, (0, 255, 255), 2)
# cv2.putText(image, "ID:" + str(carids[currentcarsindex[i]]), (int(curcent[0]), int(curcent[1] - 15)),
# cv2.FONT_HERSHEY_SIMPLEX, .5, (0, 255, 255), 2)
cv2.drawMarker(image, (int(curcent[0]), int(curcent[1])), (0, 0, 255), cv2.MARKER_STAR, markerSize=5,
thickness=1, line_type=cv2.LINE_AA)
if oldcent: # checks if old centroid exists
# adds radius box from previous centroid to current centroid for visualization
xstart = oldcent[0] - maxrad
ystart = oldcent[1] - maxrad
xwidth = oldcent[0] + maxrad
yheight = oldcent[1] + maxrad
cv2.rectangle(image, (int(xstart), int(ystart)), (int(xwidth), int(yheight)), (0, 125, 0), 1)
# checks if old centroid is on or below line and curcent is on or above line
# to count cars and that car hasn't been counted yet
if oldcent[1] >= lineypos2 and curcent[1] <= lineypos2 and carids[
currentcarsindex[i]] not in caridscrossed:
carscrossedup = carscrossedup + 1
kenderaan_kiri = carscrossedup
cv2.line(image, (0, lineypos2), (width, lineypos2), (0, 0, 255), 5)
caridscrossed.append(
currentcarsindex[i]) # adds car id to list of count cars to prevent double counting
# checks if old centroid is on or above line and curcent is on or below line
# to count cars and that car hasn't been counted yet
elif oldcent[1] <= lineypos2 and curcent[1] >= lineypos2 and carids[
currentcarsindex[i]] not in caridscrossed:
carscrosseddown = carscrosseddown + 1
kenderaan_kanan = carscrosseddown
cv2.line(image, (0, lineypos2), (width, lineypos2), (0, 0, 125), 5)
caridscrossed.append(currentcarsindex[i])
jumlah_kenderaan = carscrossedup + carscrosseddown
# Top left hand corner on-screen text
#cv2.rectangle(image, (0, 0), (250, 100), (255, 0, 0), -1) # background rectangle for on-screen text
cv2.putText(image, "Kenderaan Sebelah Kiri: " + str(carscrossedup), (0, 20), cv2.FONT_HERSHEY_SIMPLEX, .7, (255,255,255),
4)
cv2.putText(image, "Kenderaan Sebelah Kanan: " + str(carscrosseddown), (0, 45), cv2.FONT_HERSHEY_SIMPLEX, .7,
(255,255,255), 4)
# cv2.putText(image, "Total Cars Detected: " + str(len(carids)), (0, 60), cv2.FONT_HERSHEY_SIMPLEX, .5,
# (255,255,255), 1)
cv2.putText(image, "Frame: " + str(framenumber) + ' dari ' + str(frames_count), (0, 60), cv2.FONT_HERSHEY_SIMPLEX,
.5, (255,255,255), 1)
cv2.putText(image, 'Waktu: ' + str(round(framenumber / fps, 2)) + ' detik dari ' + str(round(frames_count / fps, 2))
+ ' detik', (0, 75), cv2.FONT_HERSHEY_SIMPLEX, .5, (255,255,255), 1)
# displays images and transformations and resize to 1280x720
# cv2.imshow("countours", image)
# cv2.moveWindow("countours", 0, 0)
if stat == 'color':
# frame_to_encode = frame
# resize to 1280x720
frame_to_encode = cv2.resize(image, (1280, 720))
# cv2.imshow("fgmask", fgmask)
# cv2.moveWindow("fgmask", int(width * ratio), 0)
elif stat == 'grayscale':
# frame_to_encode = gray
frame_to_encode = cv2.resize(gray, (1280, 720))
# cv2.imshow("closing", closing)
# cv2.moveWindow("closing", width, 0)
elif stat == 'detectar':
# frame_to_encode = closing
frame_to_encode = cv2.resize(bins, (1280, 720))
else :
# frame_to_encode = opening
frame_to_encode = cv2.resize(frame, (1280, 720))
_, buffer = cv2.imencode('.jpg', frame_to_encode)
frame_bytes = buffer.tobytes()
yield (b'--frame\r\n'
b'Content-Type: image/jpeg\r\n\r\n' + frame_bytes + b'\r\n')
# cv2.imshow("opening", opening)
# cv2.moveWindow("opening", 0, int(height * ratio))
# cv2.imshow("dilation", dilation)
# cv2.moveWindow("dilation", int(width * ratio), int(height * ratio))
# cv2.imshow("binary", bins)
# cv2.moveWindow("binary", width, int(height * ratio))
# video.write(image) # save the current image to video file from earlier
# adds to framecount
framenumber = framenumber + 1
k = cv2.waitKey(int(1000/fps)) & 0xff # int(1000/fps) is normal speed since waitkey is in ms
if k == 27:
break
else: # if video is finished then break loop
break
cap.release()
cv2.destroyAllWindows()
def update_video_list():
global video_list
# add "video/" to the video_list and only take video extensions
video_list = [f"video/{f}" for f in os.listdir("video") if f.endswith(".mp4")]
@app.route('/')
def index():
update_video_list()
print("video_list:", video_list)
video = request.args.get('video', 'video/video.mp4')
threshold = int(request.args.get('threshold', 450))
# Pass the video file path and threshold value to the template
return render_template('index.html', video=video, threshold=threshold, video_list=video_list)
def video_feed():
# Get the video file path, threshold value, and state from the URL parameters
video = request.args.get('video')
threshold = int(request.args.get('threshold', 450))
stat = request.args.get('stat', 'color') # Default to 'color' if state is not specified
# Return the response with the generator function
print("ini semua variable:", video, threshold, stat)
return Response(generate_frames2(video, threshold, stat), mimetype='multipart/x-mixed-replace; boundary=frame')
@app.route('/video_list')
def video_list():
update_video_list()
return render_template('video_list.html', video_list=video_list)
@app.route('/videos/<path:video>')
def video(video):
return send_from_directory('', video)
# Add route for the video feed
app.add_url_rule('/video_feed', 'video_feed', video_feed)
@app.route('/check_jumlah_kenderaan', methods=['GET'])
def check_jumlah_kenderaan():
global jumlah_kenderaan
global kenderaan_kiri
global kenderaan_kanan
return jsonify({'jumlah_kenderaan': jumlah_kenderaan, 'kenderaan_kiri': kenderaan_kiri, 'kenderaan_kanan': kenderaan_kanan})
UPLOAD_FOLDER = 'video'
@app.route('/upload', methods=['POST'])
def upload_file():
file = request.files['file']
if file.filename == '':
return jsonify({'status': False, 'message': 'No file selected'})
if file:
filename = file.filename
file.save(os.path.join(UPLOAD_FOLDER, filename))
return jsonify({'status': True, 'message': 'File uploaded successfully', 'filename': filename})
if __name__ == "__main__":
app.run(debug=True)

64
insert.py Normal file
View File

@ -0,0 +1,64 @@
from quart import Quart, request, jsonify
import aiomysql
from dotenv import load_dotenv
import os
import asyncio
# Load environment variables from .env file
load_dotenv()
app = Quart(__name__)
# MySQL connection details from environment variables
MYSQL_HOST = os.getenv('MYSQL_HOST')
MYSQL_USER = os.getenv('MYSQL_USER')
MYSQL_PASSWORD = os.getenv('MYSQL_PASSWORD')
MYSQL_DB = os.getenv('MYSQL_DB')
async def get_db_connection():
return await aiomysql.connect(
host=MYSQL_HOST,
user=MYSQL_USER,
password=MYSQL_PASSWORD,
db=MYSQL_DB,
loop=asyncio.get_running_loop()
)
@app.route('/check-connection', methods=['GET'])
async def check_connection():
try:
conn = await get_db_connection()
conn.close()
return jsonify({'message': 'Database connection successful!'}), 200
except Exception as e:
return jsonify({'message': 'Database connection failed!', 'error': str(e)}), 500
@app.route('/insert', methods=['POST'])
async def insert_data():
try:
# Get form data from the POST request
form = await request.form
nama = form.get('nama')
waktu = form.get('waktu')
kenderaan_kiri = form.get('kenderaan_kiri')
kenderaan_kanan = form.get('kenderaan_kanan')
print(nama, waktu, kenderaan_kiri, kenderaan_kanan)
conn = await get_db_connection()
async with conn.cursor() as cursor:
await cursor.execute(
"INSERT INTO tb_data (nama, waktu, kenderaan_kiri, kenderaan_kanan) VALUES (%s, %s, %s, %s)",
(nama, waktu, kenderaan_kiri, kenderaan_kanan)
)
await conn.commit()
conn.close()
return jsonify({'message': 'Data inserted successfully!'}), 201
except Exception as e:
return jsonify({'message': 'Failed to insert data!', 'error': str(e)}), 500
if __name__ == '__main__':
app.run()

244
templates/index2.html Normal file
View File

@ -0,0 +1,244 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Traffic Counter | Halaman Utama</title>
<!-- Main Styles -->
<link rel="stylesheet" href="assets/styles/style.min.css">
<!-- mCustomScrollbar -->
<link rel="stylesheet" href="assets/plugin/mCustomScrollbar/jquery.mCustomScrollbar.min.css">
<!-- Waves Effect -->
<link rel="stylesheet" href="assets/plugin/waves/waves.min.css">
<!-- Sweet Alert -->
<link rel="stylesheet" href="assets/plugin/sweet-alert/sweetalert.css">
<!-- Color Picker -->
<link rel="stylesheet" href="assets/color-switcher/color-switcher.min.css">
</head>
<body>
<div class="main-menu">
<header class="header">
<a href="#" class="logo">Traffic Counter</a>
<button type="button" class="button-close fa fa-times js__menu_close"></button>
<div class="user">
<a href="#" class="avatar"><img src="http://placehold.it/80x80" alt=""><span
class="status online"></span></a>
<h5 class="name"><a href="#">Admin</a></h5>
<h5 class="position">Administrator</h5>
<!-- /.name -->
<!-- <div class="control-wrap js__drop_down">
<i class="fa fa-caret-down js__drop_down_button"></i>
<div class="control-list">
<div class="control-item"><a href="profile.html"><i class="fa fa-user"></i> Profile</a></div>
<div class="control-item"><a href="#"><i class="fa fa-gear"></i> Settings</a></div>
<div class="control-item"><a href="#"><i class="fa fa-sign-out"></i> Log out</a></div>
</div>
</div> -->
<!-- /.control-wrap -->
</div>
<!-- /.user -->
</header>
<!-- /.header -->
<div class="content">
<div class="navigation">
<h5 class="title">Navigasi</h5>
<!-- /.title -->
<ul class="menu js__accordion">
<li class="current">
<a class="waves-effect" href="{{ url_for('index') }}"><i class="menu-icon fa fa-home"></i><span>Halaman
Utama</span></a>
</li>
<li>
<a class="waves-effect" href="{{ url_for('video_list') }}"><i class="menu-icon fa fa-home"></i><span>Video
Data</span></a>
</li>
</ul>
</div>
<!-- /.navigation -->
</div>
<!-- /.content -->
</div>
<!-- /.main-menu -->
<div class="fixed-navbar">
<div class="pull-left">
<button type="button"
class="menu-mobile-button glyphicon glyphicon-menu-hamburger js__menu_mobile"></button>
<h1 class="page-title">Halaman Utama</h1>
<!-- /.page-title -->
</div>
<!-- /.pull-left -->
</div>
<!-- /.fixed-navbar -->
<div id="wrapper">
<div class="main-content">
<div class="row small-spacing">
<div class="col-lg-2 col-md-1 col-xs-12"></div>
<div class="col-lg-8 col-md-10 col-xs-12">
<div class="box-content">
<h4 class="box-title">Form Analisa Video</h4>
<div class="card-content">
<div class="form-group">
<label for="video">Pilih Video:</label>
<select class="form-control" id="video" name="video">
<option value="-Pilih Video-" disabled selected>-Pilih Video-</option>
{% for video_var in video_list %}
<option value="{{ video_var }}" {% if video_var==video %}selected{% endif %}>{{
video_var }}</option>
{% endfor %}
</select>
</div>
<!-- <div class="form-group">
<label for="video">Threshold</label>
<input type="text" class="form-control" id="threshold" name="threshold"
value="{{ threshold }}">
</div> -->
<div class="form-group text-center">
<button type="button" class="btn btn-primary" onclick="olah_video()">Proses
Video</button>
</div>
</div>
</div>
</div>
<div class="col-lg-2 col-md-1 col-xs-12"></div>
</div>
<div class="row small-spacing">
<div class="col-lg-2 col-md-1 col-xs-12"></div>
<div class="col-lg-8 col-md-10 col-xs-12">
<div class="box-content">
<h4 class="box-title">Hasil Pengolahan Video</h4>
<div class="card-content">
<h4>Input</h4>
<img src="{{ url_for('video_feed', video=video, threshold=threshold, stat='original') }}"
alt="Warna">
</div>
</div>
</div>
<div class="col-lg-2 col-md-1 col-xs-12"></div>
</div>
<div class="row small-spacing">
<div class="col-lg-4 col-md-4 col-xs-12">
<div class="box-content">
<div class="statistics-box with-icon">
<!-- <i class="ico fa fa-car text-info"></i> -->
<h2 class="counter text-info" id="kiri">...</h2>
<p class="text">Kenderaan Kiri</p>
</div>
</div>
<!-- /.box-content -->
</div>
<div class="col-lg-4 col-md-4 col-xs-12">
<div class="box-content">
<div class="statistics-box with-icon">
<!-- <i class="ico fa fa-car text-info"></i> -->
<h2 class="counter text-info" id="kanan">...</h2>
<p class="text">Kenedraan Kanan</p>
</div>
</div>
<!-- /.box-content -->
</div>
<div class="col-lg-4 col-md-4 col-xs-12">
<div class="box-content">
<div class="statistics-box with-icon">
<!-- <i class="ico fa fa-car text-info"></i> -->
<h2 class="counter text-info" id="total">...</h2>
<p class="text">Jumlah Kenderaan</p>
</div>
</div>
<!-- /.box-content -->
</div>
</div>
<footer class="footer">
<ul class="list-inline">
<li>2024 © Traffic Counter.</li>
<!-- <li><a href="#">Privacy</a></li>
<li><a href="#">Terms</a></li>
<li><a href="#">Help</a></li> -->
</ul>
</footer>
</div>
<!-- /.main-content -->
</div><!--/#wrapper -->
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="assets/script/html5shiv.min.js"></script>
<script src="assets/script/respond.min.js"></script>
<![endif]-->
<!--
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="assets/scripts/jquery.min.js"></script>
<script src="assets/scripts/modernizr.min.js"></script>
<script src="assets/plugin/bootstrap/js/bootstrap.min.js"></script>
<script src="assets/plugin/mCustomScrollbar/jquery.mCustomScrollbar.concat.min.js"></script>
<script src="assets/plugin/nprogress/nprogress.js"></script>
<script src="assets/plugin/sweet-alert/sweetalert.min.js"></script>
<script src="assets/plugin/waves/waves.min.js"></script>
<!-- Full Screen Plugin -->
<script src="assets/plugin/fullscreen/jquery.fullscreen-min.js"></script>
<script src="assets/scripts/main.min.js"></script>
<script src="assets/color-switcher/color-switcher.min.js"></script>
<script>
function olah_video() {
var video = document.getElementById('video').value;
// var threshold = document.getElementById('threshold').value;
var threshold = 450;
window.location.href = '/?video=' + video + '&threshold=' + threshold;
}
function check_jumlah_kenderaan() {
// create an ajax
$.ajax({
type: "GET",
url: "/check_jumlah_kenderaan",
success: function (data) {
// console.log(data)
document.getElementById('kiri').innerHTML = data.kenderaan_kiri
document.getElementById('kanan').innerHTML = data.kenderaan_kanan
document.getElementById('total').innerHTML = data.jumlah_kenderaan
}
});
}
// run check_jumlah_kenderaan every 1.5 seconds\
setInterval(check_jumlah_kenderaan, 1500);
// check_jumlah_kenderaan();
</script>
</body>
</html>