inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

172만명의 커뮤니티!! 함께 토론해봐요.

선생님 데이터 import가 안돼요 ㅠㅠ

미해결

[개정판] 파이썬 머신러닝 완벽 가이드

- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 강의 내용을 질문할 경우 몇분 몇초의 내용에 대한 것인지 반드시 기재 부탁드립니다. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 선생님 보스턴 가격예측 데이터 임포트가 안돼요 ㅠㅠ

  • python
  • 머신러닝
  • 통계
이호준 댓글 2 좋아요 0 조회수 497

'블랙핑크' 검색 시에만 오류가 뜨는 현상

미해결

[신규 개정판] 이것이 진짜 크롤링이다 - 실전편 (인공지능 수익화)

안녕하세요. 강사님 아래 코드에서 '블랙핑크' 를 검색할 때 Traceback (most recent call last): File "c:\pratice_crolling\심화1_\03_스포츠 뉴스 크롤링.py ", line 52, in <module> print(article_title.text.strip()) ^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'text' 다음과 같은 오류가 뜹니다 ㅠㅠ CSS 선택자, 오타도 모두 맞게 확인이 되는데 왜 저 검색어만 오류가 뜰까요ㅠㅠ? # -*- coding: euc-kr -*- # 네이버에서 손흥민, 오승환과 같은 스포츠 관련 검색어 크롤링하기 import requests from bs4 import BeautifulSoup import pyautogui import time search = pyautogui.prompt("어떤 것을 검색하시겠어요?") response = requests.get(f"https://search.naver.com/search.naver?sm=tab_hty.top&where=news&query={search}&oquery=%EC%98%B7%EC%9C%BC%ED%99%98&tqi=i74G%2FdprvTossZPeMhCssssssko-058644") html = response.text soup = BeautifulSoup(html, "html.parser") articles = soup.select(".info_group") for article in articles: # '네이버뉴스' 가 있는 기사만 추출한다. (<a> 하이퍼링크가 2개 이상인 경우에 해당) links = article.select("a.info") if len(links) >=2 : url = links[1].attrs['href'] response = requests.get(url, headers={'User-agent':'Mozila/5.0'}) html = response.text soup = BeautifulSoup(html, "html.parser") # 스포츠 기사인 경우 if "sports" in url: article_title = soup.select_one("h4.title") article_body = soup.select_one("#newsEndContents") # 본문 내에 불필요한 내용 제거 p태그와 div태그의 내용은 출력할 필요가 없다. 없애주자. p_tags = article_body.select("p") # 본문에서 p 태그인 것들을 추출 for p_tag in p_tags: p_tag.decompose() div_tags = article_body.select("div") # 본문에서 div 태그인 것들을 추출 for div_tag in div_tags: div_tag.decompose() # 연예 기사인 경우 elif "entertain" in url: article_title = soup.select_one(".end_tit") article_body = soup.select_one("#articeBody") # 일반 뉴스 기사인 경우 else: article_title = soup.select_one("#title_area") article_body = soup.select_one("#dic_area") # 출력문 print("==================================================== 주소 ===========================================================") print(url.strip()) print("==================================================== 제목 ===========================================================") print(article_title.text.strip()) print("==================================================== 본문 ===========================================================") print(article_body.text.strip()) #strip 함수는 앞 뒤의 공백을 제거한다. time.sleep(0.3)

  • python
  • 웹-크롤링
댓글 2 좋아요 0 조회수 323

강의

미해결

공공데이터로 파이썬 데이터 분석 시작하기

코렙에서 해도 괜찮나요?

  • python
  • pandas
  • numpy
bada6517 댓글 1 좋아요 0 조회수 293

2023 버전

미해결

공공데이터로 파이썬 데이터 분석 시작하기

새로 출시된 버전으로 사용해도 문제 없나요?

  • python
  • pandas
  • numpy
bada6517 댓글 1 좋아요 0 조회수 355

[17/20] 5:30~ concat 오류

미해결

공공데이터로 파이썬 데이터 분석 시작하기

합치기 전 데이터프레임이 강의와 같이 잘 완성되었는데 concat에서 오류가 납니다 한번 봐주세요!!!

  • python
  • pandas
  • numpy
다라라람쥐 댓글 2 좋아요 0 조회수 361

PDF파일이 어디에 있나요?

해결됨

Python 알고리즘 베스트 10

안녕하세요 PDF파일은 출력하려고 하는데, 노션을 보면 "PDF 노션 페이지에서 다운로드하실 수 있습니다." 로만 되어있는데 다운받을 수 있는 링크는 어디에 있나요? 노션에서 전체PDF출력하려면 비지니스라서 불가능한데... 확인부탁드립니다.

  • python
  • 코딩-테스트
한형섭 댓글 2 좋아요 0 조회수 485

admin 에 나타나지 않는 몇몇 필드들

미해결

파이썬/장고 웹서비스 개발 완벽 가이드 with 리액트

안녕하세요, 강의를 잘 듣고 있습니다. 모델 필드에 있는 몇몇 필드들이 admin에 나타나지 않더군요 예를 들면, updated_at, created_at 같은 필드들이요 이를 위해서 admin 페이지에 일일히 모델 필드를 list_display에 등록해줘야 하는게 맞나요? from django.contrib import admin # Register your models here. from .models import * admin.site .empty_value_display = "-empty-" admin.site .register(Product) admin.site .register(CartProduct) class OrderAdmin(admin.ModelAdmin): list_display = ['customer', 'transaction_id', 'total_price'] admin.site .register(Category) admin.site .register(UserProfile) admin.site .register(Order) admin.site .register(OrderedProduct) admin.site .register(ShipmentInfo) 그럼 제가 직접만든 모델의 경우에는 그렇다 쳐도.. allauth에 있는 site domain 부분이 나오질 않는거에요 ㅠㅠ... 제가 뭘 잘못 건드렸는 지 모르겠는데, 맨처음 프로젝트할 때에는 allauth의 소셜 어플리케이션 부분에 사이트 도메인을 입력할 수 있는 커다란 박스가 있었는데, 그것만 또 안난옵니다. 제가 뭘 잘못한건지 ㅠㅠ 원래 잘 나오던건데... 이번에 파이참 커뮤니티 에디션에서 유료버전으로 바꾸고, 프로젝트를 만들고 나니 admin에 몇몇 모델의 필드들이 잘 보이지 않습니다. verbose name을 설정된것들이 특히 그런 거 같은데 무엇이 문제인지 도통 모르겠습니다. 그렇다고 allauth를 제가 admin에 등록해야하는걸까요? 2.제가 모르는 무언가가 있는걸까요?

  • react
  • python
  • django
  • docker
paichai17 댓글 1 좋아요 0 조회수 307

cleaning함수를 작성해서 데이터를 추리는 이유는 무엇인가요?

미해결

제주 하간디 이신 데이터들 Python으로 몬딱 분석해불게

제주지역에 해당하는 데이터만 뽑는 과정을 def cleaning(location): if location == '제주': return location else: return np.nan 로 하셨는데, raw_log[raw_log['지역(시도)']=='제주'].reset_index(drop=True) 로 하면 안되나요? 혹시 함수를 작성하는 경우가 메모리 상에서 좀 더 효율적인건가요?

  • pandas
  • numpy
  • seaborn
  • plotly
  • matplotlib
  • 데이터-엔지니어링
박예빈 댓글 1 좋아요 0 조회수 345

ansible-server에 pywinrm 설치 시, 에러 발생하여 문의드립니다.

미해결

구성 관리 자동화 도구 - 앤서블(Ansible)

안녕하세요. 아래 섹션 실습 중, 에러가 발생하여 문의드립니다. 섹션 9 : [응용] 윈도우 관리학 - (1)베이그런트를 이용해서 윈도우를 추가하기 Ansible_env_ready.yaml 에 아래와 같이 추가 후, vagrant provision ansible-server을 수행했는데 pvwinrm 설치 과정에서 에러가 발생하였습니다. - name: Install python-pip yum: name: python-pip state: present - name: Install pywinrm pip: name: pywinrm state: present ansible-server에 접속하여 수동으로 pip install pywinrm을 수행했는데 역시 에러가 발생합니다. python 버전을 업그레이드 하라고 메시지가 나오는데 향후 수업 따라하기 시, 영향이 있을 듯 하여 선뜻 테스트하지 못 하고 있습니다. 해결 방법에 대해서 가이드 부탁드리겠습니다. 감사합니다 !

  • ansible
  • pywinrm
  • python
doore.park 댓글 1 좋아요 0 조회수 638

작업형2 모의문제1

해결됨

[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)

train 데이터를 별도 분리안하고 범주형은 라벨 인코더로 스케일링하고나서 수치형데이터도 값이 큰건 minmaxscaler나 robustscaler로 적용하고 싶어서 개별 컬럼 선택해서 적용해보는데... 에러가 뜨는데 머가 문제인지 알수 있을까요? 수치형 범주형 개별로 스케일링 하고 싶으면 데이터를 분리했다가 다시 합쳐야 하는 걸까요? train['Total_Trans_Amt'] = scaler.fit_transform(train['Total_Trans_Amt']) test['Total_Trans_Amt']=scaler.transform(test['Total_Trans_Amt'])

  • python
  • 머신러닝
  • 빅데이터
  • pandas
  • 빅데이터분석기사
한상윤 댓글 1 좋아요 0 조회수 400

완강이 된건가요?

해결됨

[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)

안녕하세요, 강사님 지금 강의실에 보면 섹션8에 작업형3, 가설검정 콘텐츠 제작중입니다 라고 뜨고 섹션 10.에 5회 기출유형(작업형1) 강의가 업로드 되지 않았습니다. 계속 강의가 업데이트 중 인가요? 감사합니다.

  • python
  • 머신러닝
  • 빅데이터
  • pandas
  • 빅데이터분석기사
댓글 1 좋아요 0 조회수 318

로비 채팅 구현 섹션에서

해결됨

파이썬/장고로 웹채팅 서비스 만들기 (Feat. Channels) - 기본편

안녕하세요 로비 채팅 구현 강의를 들으면서 구현 중인데 redis 서버도 정상적으로 잘 작동하고 스크립트도 정확하게 썼는데 계속 채팅을 입력하고 엔터를 누르면 새로고침(초기화)이 되네요 ㅠㅠ 어떤게 문제일까요? 아무리 문제를 해결해봐도 이상한점은 찾아볼수가 없네요

  • python
  • django
  • django-channels
오창인 댓글 1 좋아요 0 조회수 306

SendGird가입

미해결

파이썬/장고 웹서비스 개발 완벽 가이드 with 리액트

안녕하세요 api 인증키를 발급받기 위해 sendgrid를 가입하려고 하는데 가입이 되지 않아서 질문남깁니다!!

  • react
  • python
  • django
  • docker
chlendyd7 댓글 3 좋아요 1 조회수 1125

requirements.txt 질문

해결됨

실전 프로젝트로 배우는 데이터 앱 만들기 with Python & Streamlit

안녕하세요 강의자료에는 requirements.txt가 안보이는 것 같은데 혹시 어디서 다운받을 수 있을까요? 버전 충돌이 발생해서요ㅠ

  • python
  • streamlit
이시현 댓글 1 좋아요 0 조회수 475

Swarmplot 에러

미해결

공공데이터로 파이썬 데이터 분석 시작하기

강의 회차 : [20/20] 지역별 분양가를 시각화하고 정리하기 질문 : 마지막 시각화 단계에서, boxplot, boxenplot, violinplot 다 잘 구현되는데 swarmplot만 계속 에러가 납니다. 구글에서 에러메시지 검색도 해 봤는데, 잘 해결이 안되네요.. 확인해 주실 수 있으신가요. * 에러메시지도 함께 첨부드립니다. --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[307], line 2 1 plt.figure(figsize=(24, 7)) ----> 2 sns.swarmplot(df, x='지역명', y='평당분양가격') File ~/anaconda3/lib/python3.10/site-packages/seaborn/categorical.py:2664, in swarmplot(data, x, y, hue, order, hue_order, dodge, orient, color, palette, size, edgecolor, linewidth, hue_norm, native_scale, formatter, legend, warn_thresh, ax, **kwargs) 2657 linewidth = size / 10 2659 kwargs.update(dict( 2660 s=size ** 2, 2661 linewidth=linewidth, 2662 )) -> 2664 p.plot_swarms( 2665 dodge=dodge, 2666 color=color, 2667 edgecolor=edgecolor, 2668 warn_thresh=warn_thresh, 2669 plot_kws=kwargs, 2670 ) 2672 p._add_axis_labels(ax) 2673 p._adjust_cat_axis(ax, axis=p.cat_axis) File ~/anaconda3/lib/python3.10/site-packages/seaborn/categorical.py:330, in _CategoricalPlotterNew.plot_swarms(self, dodge, color, edgecolor, warn_thresh, plot_kws) 321 def plot_swarms( 322 self, 323 dodge, (...) 327 plot_kws, 328 ): --> 330 width = .8 * self._native_width 331 offsets = self._nested_offsets(width, dodge) 333 iter_vars = [self.cat_axis] File ~/anaconda3/lib/python3.10/site-packages/seaborn/categorical.py:229, in _CategoricalPlotterNew._native_width(self) 226 @property 227 def _native_width(self): 228 """Return unit of width separating categories on native numeric scale.""" --> 229 unique_values = np.unique(self.comp_data[self.cat_axis]) 230 if len(unique_values) > 1: 231 native_width = np.nanmin(np.diff(unique_values)) File ~/anaconda3/lib/python3.10/site-packages/seaborn/_oldcore.py:1134, in VectorPlotter.comp_data(self) 1132 else: 1133 comp_col = pd.Series(dtype=float, name=var) -> 1134 comp_data.insert(0, var, comp_col) 1136 self._comp_data = comp_data 1138 return self._comp_data File ~/anaconda3/lib/python3.10/site-packages/pandas/core/frame.py:4786, in DataFrame.insert(self, loc, column, value, allow_duplicates) 4783 if not isinstance(loc, int): 4784 raise TypeError("loc must be int") -> 4786 value = self._sanitize_column(value) 4787 self._mgr.insert(loc, column, value) File ~/anaconda3/lib/python3.10/site-packages/pandas/core/frame.py:4877, in DataFrame._sanitize_column(self, value) 4875 return _reindex_for_setitem(value, self.index) 4876 elif is_dict_like(value): -> 4877 return _reindex_for_setitem(Series(value), self.index) 4879 if is_list_like(value): 4880 com.require_length_match(value, self.index) File ~/anaconda3/lib/python3.10/site-packages/pandas/core/frame.py:11620, in _reindex_for_setitem(value, index) 11616 except ValueError as err: 11617 # raised in MultiIndex.from_tuples, see test_insert_error_msmgs 11618 if not value.index.is_unique: 11619 # duplicate axis > 11620 raise err 11622 raise TypeError( 11623 "incompatible index of inserted column with frame index" 11624 ) from err 11625 return reindexed_value File ~/anaconda3/lib/python3.10/site-packages/pandas/core/frame.py:11615, in _reindex_for_setitem(value, index) 11613 # GH#4107 11614 try: > 11615 reindexed_value = value.reindex(index)._values 11616 except ValueError as err: 11617 # raised in MultiIndex.from_tuples, see test_insert_error_msmgs 11618 if not value.index.is_unique: 11619 # duplicate axis File ~/anaconda3/lib/python3.10/site-packages/pandas/core/series.py:4914, in Series.reindex(self, index, axis, method, copy, level, fill_value, limit, tolerance) 4897 @doc( 4898 NDFrame.reindex, # type: ignore[has-type] 4899 klass=_shared_doc_kwargs["klass"], (...) 4912 tolerance=None, 4913 ) -> Series: -> 4914 return super().reindex( 4915 index=index, 4916 method=method, 4917 copy=copy, 4918 level=level, 4919 fill_value=fill_value, 4920 limit=limit, 4921 tolerance=tolerance, 4922 ) File ~/anaconda3/lib/python3.10/site-packages/pandas/core/generic.py:5360, in NDFrame.reindex(self, labels, index, columns, axis, method, copy, level, fill_value, limit, tolerance) 5357 return self._reindex_multi(axes, copy, fill_value) 5359 # perform the reindex on the axes -> 5360 return self._reindex_axes( 5361 axes, level, limit, tolerance, method, fill_value, copy 5362 ).__finalize__(self, method="reindex") File ~/anaconda3/lib/python3.10/site-packages/pandas/core/generic.py:5375, in NDFrame._reindex_axes(self, axes, level, limit, tolerance, method, fill_value, copy) 5372 continue 5374 ax = self._get_axis(a) -> 5375 new_index, indexer = ax.reindex( 5376 labels, level=level, limit=limit, tolerance=tolerance, method=method 5377 ) 5379 axis = self._get_axis_number(a) 5380 obj = obj._reindex_with_indexers( 5381 {axis: [new_index, indexer]}, 5382 fill_value=fill_value, 5383 copy=copy, 5384 allow_dups=False, 5385 ) File ~/anaconda3/lib/python3.10/site-packages/pandas/core/indexes/base.py:4274, in Index.reindex(self, target, method, level, limit, tolerance) 4271 raise ValueError("cannot handle a non-unique multi-index!") 4272 elif not self.is_unique: 4273 # GH#42568 -> 4274 raise ValueError("cannot reindex on an axis with duplicate labels") 4275 else: 4276 indexer, _ = self.get_indexer_non_unique(target) ValueError: cannot reindex on an axis with duplicate labels

  • python
  • pandas
  • numpy
Lucy 댓글 1 좋아요 1 조회수 574

database is locked.

미해결

실리콘밸리 엔지니어가 가르치는 파이썬 장고 웹프로그래밍

sqliteBrowser 사용하는 수업에서 db.sqlite3를 열려고 하니, database is locked 라는 메시지가 뜹니다. 그래서 ChatGPT나 Bard... Googling을 이용해봤지만, 저에게 해당될만한 내용이 없네요. 혹시 몰라 재부팅도 해봤습니다. 이거 DB부분만 지웠다가 다시 까는 방법이 있을까요? (makemigrations, migrate 부분)

  • python
  • django
  • bootstrap
  • rest-api
  • drf
bigseoul 댓글 3 좋아요 1 조회수 2709

회귀 실습 중 rmse 결과값 질문

해결됨

[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)

안녕하세요 선생님 현재 모델링 및 평가(회귀)부분을 학습하고 있습니다. 코드를 따라가면서 실습을 진행하고 있는데, rmse 값이 선생님과 달라 질문 드립니다. 제가 알기로는 모델링을 하는 과정에서 예측한 값이 달라질 수 있고, 이에 따라 평가지표인 rmse 값이 다를 수 있다...라고 알고 있습니다. 그런데 값의 차이 뿐만이 아니라 baseline과 scaler 적용 결과가 좋은지 나쁜지가 달라 질문드립니다. 예를 들어, 선생님께서 하셨을때는 RandomForestRegressor의 baseline이 rmse값이 가장 좋았고(작았고), scaler를 적용했을 때 rmse가 커져서 scaler 적용은 하지 않는게 좋다~라는 내용의 실습이었는데 제가 했을 때는 baseline의 rmse보다 scaler를 적용했을 때의 rmse가 작아 scaler를 적용하는 것이 좋다..는 결론이 나옵니다. 질문을 정리하자면, 모델링을 하는 과정에서 선생님과 제가 실습한 예측값과 rmse가 다른게 맞는지 다른게 맞다 해도 scaler 적용여부 등을 바꿀 수 있을 정도로 예측값과 rmse가 달라질 수 있는지 (추가질문)달라지더라도 선생님 실습값 : 4728.xx 제 실습값 6025.174022213681 이정도로 달라질 수 있는지... (추가질문) 모델링 및 평가(회귀) 24:56에서 수험자는 알 수 없는 영역>y_test로 rmse로 구하시고 결과값이 17909.xx로 나왔는데 여기에서도 charges에 로그변환 한 이후기 떄문에 원래는 np.exp(pred)로 rmse를 구했어야 하는지 일 것 같습니다. 감사합니다.

  • python
  • 머신러닝
  • 빅데이터
  • pandas
  • 빅데이터분석기사
콘스트 댓글 1 좋아요 1 조회수 709

질문 : for문 풀어쓰기

미해결

파이썬 증권 데이터 수집과 분석으로 신호와 소음 찾기

안녕하세요. 선생님. 해당 강의에서 아래와 같이 for문을 한줄에 쓰셨는데요? FAANG=["META", "AMZN", "AAPL", "NFLX", "GOOGL"] faang_list=[fdr.DataReader(code,'2015','2021')["Close"]for code in FAANG] df_faang=pd.concat(faang_list, axis=1) 제가 이걸 으로 시작해서 두줄에 풀어썼는데... 에러가 나는데요? 혹시 어느 부분이 잘못되었는지 알려주실수 있으신지요? FAANG=["META", "AMZN", "AAPL", "NFLX", "GOOGL"] for code in FAANG: faang_list=[fdr.DataReader(code,'2015','2021')["Close"]for code in FAANG] df_faang=pd.concat(faang_list, axis=1)

  • python
  • pandas
  • numpy
  • 웹-크롤링
  • seaborn
  • plotly
  • matplotlib
  • 웹-스크래핑
lcw07 댓글 1 좋아요 0 조회수 524

인기 태그

인프런 TOP Writers

주간 인기글