분류 전체보기(612)
-
Namespaces (using)
출처: https://en.cppreference.com/w/cpp/language/namespace#Namespaces Namespaces - cppreference.comNamespaces provide a method for preventing name conflicts in large projects. Entities declared inside a namespace block are placed in a namespace scope, which prevents them from being mistaken for identically-named entities in other scopes. Entities declaren.cppreference.com * using - using namespace..
2024.08.03 -
Namespaces (스코프)
참고: https://en.cppreference.com/w/cpp/language/namespace Namespaces - cppreference.comNamespaces provide a method for preventing name conflicts in large projects. Entities declared inside a namespace block are placed in a namespace scope, which prevents them from being mistaken for identically-named entities in other scopes. Entities declaren.cppreference.com * 스코프 연산자 기준 위치 - ns-name :: member-..
2024.08.02 -
판다스 (Pandas) (데이터 선택 및 필터링)
1. 인덱싱과 슬라이싱데이터 선택하기import pandas as pd# DataFrame 생성data = {'Name': ['Alice', 'Bob', 'Charlie', 'David', 'Edward'], 'Age': [25, 30, 35, 40, 45], 'City': ['New York', 'Los Angeles', 'Chicago', 'Houston', 'Phoenix']}df = pd.DataFrame(data)# 단일 열 선택print(df['Name'])# 여러 열 선택print(df[['Name', 'City']])# 열 추가df['Salary'] = [50000, 60000, 70000, 80000, 90000]print(df)0 Alice1 ..
2024.08.02 -
판다스 (Pandas) (데이터 입출력)
1. CSV 파일 읽기import pandas as pd# CSV 파일 읽기df = pd.read_csv('sample_data.csv')print(df) 2. Excel 파일 읽기 import pandas as pd# Excel 파일 읽기df = pd.read_excel('sample_data.xlsx')print(df) 3. JSON 파일 읽기 import pandas as pd# JSON 파일 읽기df = pd.read_json('sample_data.json')print(df) 4. HTML 파일 읽기import pandas as pd# HTML 파일 읽기url = 'https://example.com/sample_data.html'df_list = pd.read_html(url)df = d..
2024.08.02 -
판다스 (Pandas) (소개 및 기본 내용)
Pandas: "Panel Data"와 "Python Data Analysis"의 합성어로 만들어진 이름. 판다스(Pandas)는 파이썬에서 데이터 분석을 쉽게 할 수 있도록 도와주는 라이브러리로 특히 테이블 형태의 데이터를 처리하는 데 유용합니다. 데이터프레임(DataFrame)과 시리즈(Series)라는 두 가지 주요 데이터 구조를 사용하여 데이터를 조작 및 분석할 수 있습니다. 1. 판다스 설치하기 터미널에서 다음 명령어 입력pip install pandas 주피터 노트북에서는 다음 코드로 실행 가능!pip install pandas 2. 데이터 구조 Series: 1차원 데이터 구조 예시:import pandas as pd# 리스트를 이용해 Series 생성data = [1, 2, 3, 4, ..
2024.08.02 -
Tkinter 기본 기능
Tkinter 가져오기import tkinter as tkfrom tkinter import ttk 메인 윈도우 생성root = tk.Tk()root.title("내 Tkinter 앱")root.geometry("400x300") 기본 위젯라벨(Label)label = tk.Label(root, text="안녕하세요, Tkinter!")label.pack() 버튼(Button)def on_click(): print("버튼 클릭됨")button = tk.Button(root, text="클릭하세요", command=on_click)button.pack() 엔트리(Entry)entry = tk.Entry(root)entry.pack() 텍스트(Text)text = tk.Text(root, height=..
2024.07.30