Data Science(40)
-
Api Crawling /Json 형식 데이터 단일/다중 수집 서울 열린데이터 광장
JSON 형식 단일데이터 수집 URL=f'http://openapi.seoul.go.kr:8088/{SERVICE_KEY}/json/tbLnOpendataRtmsV/1/100/' URL import requests import json import pandas as pd req = requests.get(URL) content = req.json() #json데이터 불러오기 result = pd.DataFrame(content['tbLnOpendataRtmsV']['row']) #중요부분 result 다중데이터 수집 공공데이터는 블러올떄 리미트가 걸린 경우들이 많음 서울 열린데이터 광장의 경우 1000개 제한 data = None SERVICE_KEY ='**************************..
2024.02.01 -
[Streamlit] 익히기 프로젝트/Kaggle Exploratory Analysis - Instacart 데이터 활용/ 리뷰
사용된 데이터 https://www.kaggle.com/code/philippsp/exploratory-analysis-instacart Exploratory Analysis - Instacart Explore and run machine learning code with Kaggle Notebooks | Using data from Instacart Market Basket Analysis www.kaggle.com 미완성이지만 혼자 드립다 박으며한 스트림릿 배포 자료 https://market-kawyemybtg4egrbkuwxajt.streamlit.app/ 미니 프로젝트의 요지 Streamlit에서 배운걸 활용하자! 분석위주의 내용보다는 기능을 익히기 위한 프로젝트 깃허브와 스트림릿 배포 마스터!..
2024.01.30 -
[Streamlit] tab과 col 명령어
# _*_ coding:utf-8 _*_ import streamlit as st import matplotlib.pyplot as plt import plotly.graph_objects as go import pandas as pd import yfinance as yf import seaborn as sns def main(): st.title("hello") with st.sidebar: st.header("Sidebar") day = st.selectbox("Select a day", ["Thur", "Fri", "Sat", "Sun"]) tips = sns.load_dataset("tips") filtered_tips = tips[tips["day"] == day] top_bill = filt..
2024.01.30 -
[Streamlit] sidebar활용
# _*_ coding:utf-8 _*_ import streamlit as st import matplotlib.pyplot as plt def main(): value1 = st.slider("숫자선택",0,100) st.write(value1) value2 = st.sidebar.slider("숫자",0,200) st.sidebar.write(value2) #st.write(value2) with st.sidebar: # 데코레이터 : 음식 서빙이 종료되면 처음부터 세팅 value3 = st.slider("숫자선택,with sidebar",0,300) st.write(value3) st.markdown("matplotlib") fig, ax =plt.subplots() ax.plot([1,2,3])..
2024.01.30 -
[Streamlit] st.write/ 마크다운 사용하기
전체 코드 import streamlit as st import pandas as pd import numpy as np import altair as alt def main(): st.write(1234) st.write(pd.DataFrame({ 'first column': [1, 2, 3, 4], 'second column': [10, 20, 30, 40], })) # 사전의 형식으로 들어감 data_frame = pd.DataFrame({ 'first column': [1, 2, 3, 4], 'second column': [10, 20, 30, 40], }) st.write('Below is a DataFrame:', data_frame, 'Above is a dataframe.') #차트객체 허..
2024.01.29 -
내가 보려고 만드는 기본 리눅스 명령어 정리
ls : list약자로 해당 디렉터리(폴더)에 있는 파일의 목록을 나열하는 명령어 cd : change directory약자로 디렉터리를 이동하는 명령어 cd.. : 상위 디렉터리로 이동 cd 폴더명 pwd : print working directory의 약자 현재 디렉터리의 전체 경로 표시 rm : remove의 약자로 디렉터리 삭제 cp : copy의 약자로 파일 또는 디렉터리를 복사 cp abc.txt 확장자명까지 쓸것 touch : 크기가 0인 새 파일을 생성하거나 생성된 파일이 존재한다면 파일의 수정시간 변경 mv : move의 약자로 파일이나 디렉터리의 이름을 변경하거나 다른 디렉터리로 옮길 때 사용 mv abc.txt/system system 디렉터리로 이동 cat : conCATenate의..
2024.01.23