6:49 print 출력부분
해결됨
[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
시험환경에서 작업형1, 3 은 따로 결과를 기입하는 부분이 있다고 알고있습니다.결과쓰는 부분에 답을 81 이라고 쓰면 될것 같은데, print() 로 써야 한다고 하는 부분이 이해가 안갑니다.결과 제출을 어떻게 해야하는지요?
- python
- 머신러닝
- 빅데이터
- pandas
- 빅데이터분석기사
172만명의 커뮤니티!! 함께 토론해봐요.
해결됨
[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
시험환경에서 작업형1, 3 은 따로 결과를 기입하는 부분이 있다고 알고있습니다.결과쓰는 부분에 답을 81 이라고 쓰면 될것 같은데, print() 로 써야 한다고 하는 부분이 이해가 안갑니다.결과 제출을 어떻게 해야하는지요?
미해결
반응형 웹사이트 포트폴리오(Architecture Agency)
<!doctype html> <html lang="ko"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>DesignWorks Architecture Agency</title> <script src="js/jquery-2.1.4.js"></script> <!-- Page Scroll Effects JS & CSS --> <script src="js/velocity/modernizr.js"></script> <script src="js/velocity/velocity.min.js"></script> <script src="js/velocity/velocity.ui.min.js"></script> <script src="js/velocity/main.js"></script> <link rel="stylesheet" href="js/velocity/velocity.css"> <!-- Smooth Scrolling --> <script src="js/jquery.scrollTo.min.js"></script> <!-- Custom JS & CSS --> <script src="custom.js"></script> <link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="responsive.css"> </head> <!-- hijacking: on/off - animation: none/scaleDown/rotate/gallery/catch/opacity/fixed/parallax --> <body data-hijacking="on" data-animation="rotate"> <div class="container"> <section class="cd-section visible" id="home"> <div> <div class="content"> <img src="images/temp-section-01.jpg"> </div> </div> </section> <section class="cd-section" id="about"> <div> <div class="content"> <img src="images/temp-section-02.jpg"> </div> </div> </section> <section class="cd-section" id="project"> <div> <div class="content"> <img src="images/temp-section-03.jpg"> </div> </div> </section> <section class="cd-section" id="plan"> <div> <div class="content"> <img src="images/temp-section-04.jpg"> </div> </div> </section> <section class="cd-section" id="awards"> <div> <div class="content"> <div class="awards-inner"> <div class="about-awards"> <div class="about-heading"> <!-- 이런식으로 부모요소로 묶기 --> <h2>2024 <br>Architecture Awards <br>Winner</h2> <hr class="bar"> <p> The mission of the Architecture MasterPrize (AMP) is to advance the appreciation and exposure of quality architectural design worldwide. The AMP architecture award celebrates creativity and innovation in the fields of architectural design, landscape architecture, and interior design. Submissions from architects all around the world are welcome. </p> <!-- 새창에서 띄우기 타겟 블랭크 --> <a href="https://architectureprize.com/" target="_blank">View the awards</a> </div> </div> <div class="victory-jump"> <img src="/images/victory-jump.png"> </div> </div> </div> </div> </div> </section> <section class="cd-section" id="location"> <div> <div class="content"> <div class="location-inner"></div> </div> </div> </section> <section class="cd-section" id="contact"> <div> <div class="content"> <img src="images/temp-section-07.jpg"> </div> </div> </section> <header> <div class="gnb-inner"> <div class="logo"> <a href="#none"><img src="images/logo.png"></a> </div> <div class="gnb"> <div class="menu"> <a href="#home">Home</a> <a href="#about">About</a> <a href="#project">Project</a> <a href="#plan">Plan & History</a> <a href="#awards">Awards</a> <a href="#location">Location</a> <a href="#contact">Contact</a> </div> <div class="slogan">We design places, not projects.</div> </div> <div class="trigger"> <span></span> <span></span> <span></span> </div> </div> </header> </div> <!-- 스크롤 부분 --> <a href="#" class="gototop"><img src="images/gototop.png"></a> <!-- 폰트어썸 아이콘부분 --> <a href="#" class="btn-hiring"><i class="fa fa-commenting"></i> Hiring</a> <nav> <ul class="cd-vertical-nav"> <li><a href="#0" class="cd-prev inactive">Next</a></li> <li><a href="#0" class="cd-next">Prev</a></li> </ul> </nav> </body> </html> * pc버전 */ /* Google Web Font : Montserrat */ @import url('https://fonts.googleapis.com/css?family=Montserrat:200,300,400,500&display=swap'); @import url('https://fonts.googleapis.com/css?family=Manrope:300,400,500,600&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@200;300;400;600;700;900&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Overpass&display=swap'); /* FontAwesome CDN 4.7 */ @import url('https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css'); /* Reset CSS */ * { box-sizing: border-box; } ul { list-style: none; } a { text-decoration: none; } /* Default CSS */ body { font-family: 'Montserrat', sans-serif; color: #222; font-size: 15px; margin: 0; height: 100vh; background-color: #fff; } /* Entire Layout */ .cd-section { height: 100vh; } .cd-section > div { height: 100%; position: relative; } .content { background-color: #ddd; position: absolute; width: calc(100% - 40px); height: calc(100% - 80px); left: 20px; bottom: 20px; overflow: hidden; } /* Header */ header { position: fixed; top: 0; left: 0; width: 100%; } .gnb-inner { /*border: 1px solid #000;*/ width: calc(100% - 40px); margin: auto; height: 60px; line-height: 60px; } .logo { float: left; } .logo img { padding-top: 17px; } .gnb { float: right; } .menu { display: none; } .menu a {} .slogan { font-size: 16px; font-style: italic; } .trigger { display: none; } /* Hiring Button */ .btn-hiring { position: fixed; right: 50px; bottom: 50px; color: #fff; background-color: #000; /* 앞 px상하,뒤 px좌우 */ padding: 10px 20px; border-radius: 20px; /* 가로,세로,퍼짐정도 */ box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.38); transition: 0.5s; } .btn-hiring .fa { transform: rotateY(180deg); margin-right: 5px; } /* 버튼이 눌리는 느낌 */ .btn-hiring:active { transform: scale(0) } /* ################### Section : awards-winner ################### */ .awards-inner { height: 100%; border: 1px solid #ddd; } .awards-inner > div { border: 1px solid #000; float: left; width: 50%; height: 100%; position: relative; } .about-awards { background-color: #1a1f24; color: #fff; } .about-heading { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; width: 70%; } .victory-jump { background-color: #fff; } .victory-jump img { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 80%; } 선생님께서 올려주신 비쥬얼스튜디오 full reload 해결 방법 강의를 듣고 적용시킨 후 작업 중이였는데 갑자기 코딩 시 최상단으로 올라가는 현상이 발생합니다.설정을 다시 확인하고 익스텐션에서 open sever를 재설치하였음에도 해결되지 않아서 질문드립니다!
해결됨
[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! 질문과 관련된 영상 위치를 알려주면 더 빠르게 답변할 수 있어요 먼저 유사한 질문이 있었는지 검색해보세요
해결됨
[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
#100%가 넘는 접종률 제거 df = df[df['ratio']<100] # print(df.head()) # print(df['country'].value_counts()) df2 = df.groupby('country').max()import pandas as pd df = pd.read_csv("../input/covid-vaccination-vs-death/covid-vaccination-vs-death_ratio.csv") # print(df.head()) df2 = df.groupby('country').max() #시간에 따라 접종률이 점점 올라감 df2 = df2.sort_values(by='ratio', ascending = False) #100%가 넘는 접종률 제거 cond = df2['ratio'] <= 100 df2 = df2[cond] top = df2['ratio'].head(10).mean() bottom = df2['ratio'].tail(10).mean() print(round(top - bottom,1)) 제 코드 입니다. 제가 여기서 여쭤보고싶은 내용은 먼저 100%이상건을 제외하고 작업에 들어가야하지 않나용?
해결됨
[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! 질문과 관련된 영상 위치를 알려주면 더 빠르게 답변할 수 있어요 먼저 유사한 질문이 있었는지 검색해보세요 안녕하세요 강사님. 5회 기출유형 작업형 2 베이스 모델 만드는 부분(6분 43초) 관련하여 질문드립니다. rmse 값을 구하니 강사님 값과 다르게 나옵니다(강사님: 1529, 본인: 1548) 랜덤포레스트분류 문제에서는 RandomForestClassifier() 괄호 안에 random_state를 지정해주었는데 이번 강의에서는 RandomForestRegressor() 괄호 안에 아무것도 넣지 않아서 값이 다르게 나온 것일까요? 위의 내용이 맞다면 RandomForestRegressor에도 random_state를 지정해준 후 모델 성능을 개선시켜야 하는 것인지 궁금합니다.
해결됨
[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
소팅에 관해서 질문 드립니다! 예를 들어 f1컬럼을 내림차순으로 소팅한다고 했을 때 df=df['f1'].sort_values(ascending=False) df=df.sort_values('f1', ascending=False) 위의 두가지 코드는 어떤 차이가 있는지 알 수 있을까요? 그리고 추가로 소팅 후 n개의 데이터를 선택할 때 rese_index를 하는게 좋은지 궁금합니다!
해결됨
[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! 질문과 관련된 영상 위치를 알려주면 더 빠르게 답변할 수 있어요 먼저 유사한 질문이 있었는지 검색해보세요 값이 -0.049847258342167904 인데 round 써서 3번째까지 나타내려 하니 -0.050 이라 출력이 -0.05 까지밖에 안나와요 ㅜ 이럴 땐 어떻게 하나요? 그냥 print(-0.050) 해야할까요?
해결됨
[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
주석 처리 하려고 컨트롤 키 + / 키를 하는데 어떤 때는 주석처리가 되는 데. 또 어떤 때는 오른쪽 끝에 빨간줄이 생기 면서 주석처리가 안되고 계속 기존 입력 칸 보다 작은(?) 칸으로 / 만 입력이 되는데 어떻게 해야하나요?ㅜㅜ
미해결
[신규 개정판] 이것이 진짜 크롤링이다 - 실전편 (인공지능 수익화)
자동화를 하려고 하는데 웨일도 가능한가요?자꾸만 크롬이 켜져서 ,,
해결됨
[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
만약 결측치가 있는 데이터가 문제로 나오게 된다면 범주형 데이터는 최빈값으로 채우고 수치형 데이터는 중앙값으로 채우려는데 괜찮을까요? (중앙값이 이상치에 덜 민감하다고해서 평균말고 중앙값으로 대체하려고 합니다.) 아니면 제거하는게 좋을까요? 그리고 경우에 따라 다르겠지만 보통 대체하는 쪽이 성능이 더 좋은가요?
해결됨
[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
작업형 2번을 풀 때, test 데이터의 행은 절대 삭제하면 안되고, 삭제할 경우 0점 처리를 맞는다고 알고 있습니다. 제가 말의 뜻을 정확하게 이해를 못해서 그런데, 혹시 제가 이해한 것이 맞는지 한 번만 확인해주시면 감사하겠습니다. [제가 이해한 뜻] 1번 상황) 예를들어 처음에 train, test 데이터가 주어졌습니다. train.shape, test.shape으로 찍었을 때, (10000,10), (2000,9)가 나왔습니다. 전처리를 통해서, train과 test의 불필요한 컬럼, 결측치가 너무 많은 컬럼을 삭제하였습니다. 그 이후 train.shape, test.shape을 찍었을 때, (10000,8), (2000,7) 이 나왔습니다. 2번 상황) 전처리 하기 전 train.shape이 (2000,9) 가 전처리 후 train.shape이 (1800,7) 이 나왔습니다. 제가 이해하기로, 1번 상황처럼 train과 test의 동일한 컬럼을 삭제하는 것은 상관 없는데, 2번 상황처럼, test의 행 데이터가 손실되는 것은 안되는 걸로 이해했습니다. 혹시 제가 이해한 것이 맞는지 봐주시면 정말 감사하겠습니다..!
해결됨
[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
df2 = df.groupby('country').max() #시간에 따라 접종률이 점점 올라감 df2 = df2.sort_values(by='ratio', ascending = False) 여기서 df.groupby('country')['ratio'].max() 를 하지 않고 그냥 max()를 한 이유가 뭔가요? 접종률 상위 10개국, 하위 10개국을 찾는게 아닌가요?
해결됨
[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
선생님 대부분 3유형에서는from scipy import stats 불러오구 stats.levene~ , stats.wilcoxn 이렇게 등등 다 불러오던데f_oneway만 import scipy.stats as stats 이렇게 불러오는거로 가르쳐 주시던데 from scipy import statsstats.f_oneway(그룹A,B,C) 이렇게 해도 분석이 되는거 같은데 이렇게 불러두 되나요? 어떤건 from scipy.stats as stats이고어떤건 from scipy import stats 여서 좀 헷갈리더라구요 ㅠㅠ 또 카이제곱은 from scipy.stats import Chisquare 이런형태구...from scipy import Chisquarestats.Chisquare(df['a'],df['b']) 이렇게 해두 되나요?
미해결
[신규 개정판] 이것이 진짜 크롤링이다 - 실전편 (인공지능 수익화)
for i in (1,2): 2페이지까지 도는 문법이 이렇게만 작성해도 되던데 range를 꼭 적어줘야하나요 ?
해결됨
[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
# 시험환경 세팅 (코드 변경 X) import pandas as pd import numpy as np from sklearn.model_selection import train_test_split def exam_data_load(df, target, id_name="", null_name=""): if id_name == "": df = df.reset_index().rename(columns={"index": "id"}) id_name = 'id' else: id_name = id_name if null_name != "": df[df == null_name] = np.nan X_train, X_test = train_test_split(df, test_size=0.2, random_state=2021) y_train = X_train[[id_name, target]] X_train = X_train.drop(columns=[target]) y_test = X_test[[id_name, target]] X_test = X_test.drop(columns=[target]) return X_train, X_test, y_train, y_test df = pd.read_csv("../input/titanic/train.csv") X_train, X_test, y_train, y_test = exam_data_load(df, target='Survived', id_name='PassengerId') X_train.shape, X_test.shape, y_train.shape, y_test.shape #Survived예측 print(X_test.shape) target=y_train['Survived'] test_id=X_test['PassengerId'].copy() test=X_test train=X_train print(train.shape, test.shape) train=train.drop('PassengerId', axis=1) test=test.drop('PassengerId', axis=1) train=train.drop('Name', axis=1) test=test.drop('Name', axis=1) print(train.shape, test.shape) #합치기 df=pd.concat([train, test]) df['Age']=df['Age'].fillna(df['Age'].mean()) df['Cabin']=df['Cabin'].fillna(df['Cabin'].mode()[0]) df['Embarked']=df['Embarked'].fillna(df['Embarked'].mode()[0]) #인코딩 from sklearn.preprocessing import LabelEncoder cols=df.select_dtypes(include='O').columns for col in cols: le=LabelEncoder() df[col]=le.fit_transform(df[col]) #쪼개기(712, 179) train=df[:712] test=df[712:] print(train.shape, test.shape) print(target.shape) from sklearn.model_selection import train_test_split x_tr, x_val, y_tr, y_val=train_test_split(train, target, test_size=.2, random_state=2022) from sklearn.ensemble import RandomForestClassifier rf=RandomForestClassifier(random_state=2022) rf.fit(x_tr, y_tr) pred=rf.predict(test) print(pred) print(pred.shape) print(len(test_id)) submit=pd.DataFrame({ 'PassengerId': test_id, 'Survived': pred }) submit.to_csv('수험번호.csv', index=False) print(submit.shape) 캐글 타이타닉 보고 이렇게 작성해보았는데, 혹시 0점 될만한 요인이 있을까요??ㅠㅠ test데이터 행 수 하고 pred수 하고 동일한거 확인했습니다! 그리고 제출할때는 split로 안쪼개고 바로 fit(train, target)해서 predict(test)해도 되는 부분일까요?
해결됨
[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
기출 한 가지 방법 풀기에는 수치형, 범주형 분리 & 로버스트 스케일 작업이 없고 바로 get_dummies가 나오는데, 실전에서 바로 get_dummies를 사용해도 상관없는지 궁금합니다
해결됨
[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! 질문과 관련된 영상 위치를 알려주면 더 빠르게 답변할 수 있어요 먼저 유사한 질문이 있었는지 검색해보세요 안녕하세요! 기출(작업형2) 한가지 방법으로 풀기 13분쯤에 print("\n ===== 카테고리 비교 =====") print(train.describe(include='O')) print(test.describe(include='O')) 이 코드가 있는데 이 코드는 회귀인 경우에만 사용하는 건가요? EDA라서 생략을 해도 되는 것 같긴 한데, 어떤 때 사용하는지 그리고 목적이 무엇인지 궁금합니다!
해결됨
[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! 질문과 관련된 영상 위치를 알려주면 더 빠르게 답변할 수 있어요 먼저 유사한 질문이 있었는지 검색해보세요 target 값은 절대로 절대로 인코딩해서는 안되나요? ? 그냥 아묻따 전처리 때 분리하는 것이 가장 좋겠죠??
해결됨
[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
안녕하세요 선생님! 2번문제에서 1~6학년까지의 학생수 합을 구하고 그걸 교사수로 나누는 부분에서 이렇게 강의와 똑같이 코딩을 하였는데 sum() 아래의 식이 출력되면서 실행할 때마다 전체학생수가 계속 늘어나더라구요,, 이건 왜 그런걸까요? sum식을 한번 써주고 주석처리해야하는걸까요?
해결됨
[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! 질문과 관련된 영상 위치를 알려주면 더 빠르게 답변할 수 있어요 먼저 유사한 질문이 있었는지 검색해보세요 시계열데이터 변환시 (to_datetime) format을 형식 질문드립니다 년도, 월, 일 을 나눈는 기준이 %인거같고 사이사이 형식(월,-,/)과같은걸 어디에 넣는지와와 순서가 헷갈려서요 강의시 데이터중 data5컬럼은 변환시 바로 잘바뀌었는데 만약을위해 format을 쓴다면 df['Date4'] = pd.to _datetime(df['Date4'],format = '%d-%m-%Y') 오류가 납니다. 같은 방식으로 DateTime3, DateTime4 도 format을 사용시 어떻게 사용해야할지?? 머가 문제인건지?? 해결 방법을 여쭙니다