area_map.csv
총 225row construction Site는 0이나 1이다
지역과 좌표 정보를 담은 기본 지도 데이터입니다.
| x | y | ConstructionSite |
| 1 | 1 | 0 |
| 1 | 2 | 0 |
| 1 | 3 | 0 |
| 1 | 4 | 0 |
| 1 | 5 | 0 |
area_struct.csv
구조물의 위치(xy)와 종류(ID == category)를 나타내는 데이터입니다
총 225개 row area는 1만 필터링한다.
| x | y | category | area |
| 1 | 1 | 0 | 0 |
| 1 | 2 | 0 | 0 |
| 1 | 3 | 0 | 0 |
| 1 | 4 | 2 | 0 |
| 1 | 5 | 0 | 0 |
area_category.csv
구조물 종류 ID를 이름으로 매핑해주는 참조 데이터입니다.
총4row 구조물 ID
| category | struct |
| 1 | Apartment |
| 2 | Building |
| 3 | MyHome |
| 4 | BandalgomCoffee |
import pandas as pd
import os
print(f'__file__ : {__file__}')
#__file__ : d:\git\Codyssey\team_pre\readcsv.py
base_dir = os.path.dirname(__file__)
# 'D:\\git\\Codyssey\\team_pre'
csv_path = os.path.join(base_dir, 'data', 'area_category.csv')
#'D:\\git\\Codyssey\\team_pre\\data\\area_category.csv'
area_category = pd.read_csv(csv_path)
print("area_category\n",area_category.head())
area_map = pd.read_csv("team_pre/data/area_map.csv") #, encoding='utf-8'
print("area_map\n",area_map, area_map.head())
area_struct = pd.read_csv("team_pre/data/area_struct.csv")
print("area_strut:\n", area_struct.head())
실행결과
__file__ : d:\git\Codyssey\team_pre\readcsv.py
area_category
category struct
0 1 Apartment
1 2 Building
2 3 MyHome
3 4 BandalgomCoffee
area_map
x y ConstructionSite
0 1 1 0
1 1 2 0
2 1 3 0
3 1 4 0
4 1 5 0
.. .. .. ...
220 15 11 0
221 15 12 0
222 15 13 0
223 15 14 0
224 15 15 0
[225 rows x 3 columns] x y ConstructionSite
0 1 1 0
1 1 2 0
2 1 3 0
3 1 4 0
4 1 5 0
area_strut:
x y category area
0 1 1 0 0
1 1 2 0 0
2 1 3 0 0
3 1 4 2 0
4 1 5 0 0
PS D:\git\Codyssey> & "C:/Program Files/Python311/python.exe" d:/git/Codyssey/team_pre/readcsv.py
__file__ : d:\git\Codyssey\team_pre\readcsv.py
area_category
category struct
0 1 Apartment
1 2 Building
2 3 MyHome
3 4 BandalgomCoffee
area_map
x y ConstructionSite
0 1 1 0
1 1 2 0
2 1 3 0
3 1 4 0
4 1 5 0
.. .. .. ...
220 15 11 0
221 15 12 0
222 15 13 0
223 15 14 0
224 15 15 0
[225 rows x 3 columns] x y ConstructionSite
0 1 1 0
1 1 2 0
2 1 3 0
3 1 4 0
4 1 5 0
area_strut:
x y category area
0 1 1 0 0
1 1 2 0 0
2 1 3 0 0
3 1 4 2 0
4 1 5 0 0
'Codyssey > AI선발팀프로젝트' 카테고리의 다른 글
| caffee_map 분석 (2) | 2025.07.24 |
|---|---|
| A* 휴리스틱 알고리즘 + JPS (0) | 2025.07.24 |
| 최단거리 알고리즘 공부 다익스트라 A* (3) | 2025.07.23 |
| 최단거리 그리기 matlib (4) | 2025.07.22 |
| pandas dataFrame 연습 (0) | 2025.07.19 |