code: import time, random import data import uiautomator2 as u2 serial = "********" device = u2.connect(serial) device(resourceId="com.instagram.android:id/row_feed_button_like").click() 실행 시 오류 C:\Users\user\AppData\Local\Programs\Python\Python310\python.exe C:/Users/user/Desktop/pythonProject1/insta/ momobiletest.py Traceback (most recent call last): File "C:\Users\user\Desktop\pythonProject1\insta\momobiletest.py", line 8, in <module> device(resourceId="com.instagram.android:id/row_feed_button_like").click() File "C:\Users\user\AppData\Roaming\Python\Python310\site-packages\uiautomator2\_selector.py", line 149, in click self.must_wait(timeout=timeout) File "C:\Users\user\AppData\Roaming\Python\Python310\site-packages\uiautomator2\_selector.py", line 344, in must_wait raise UiObjectNotFoundError({'code': -32002, 'data': str(self.selector), 'method': 'wait'}) uiautomator2.exceptions.UiObjectNotFoundError: {'code': -32002, 'data': "Selector [resourceId='com.instagram.android:id/row_feed_button_like']", 'method': 'wait'} uiautomator2 버전은 3.0.10 adbutils 버전은 2.6.2 왜 계속 오류가 뜨고 안되는지 모르겠습니다.
선생님! iloc같은경우 인덱스값은 그 앞에 까지 뽑기때문에 +1 해주는 범위까지 설정 해 주는것인데, 컬럼 번호 쓸때는 해당 없는거 같네요?! quiz 2번 푸는데 iloc로 메뉴~할인율 까지 할때 범위를 :3으로 하시길래요! 위에 설명할때는 iloc때 범위를 :로 나타낼 때 마지막을 포함하지 않는다고 하셨는데, 인덱스만 포함하지 않는게 맞는거죠?
[리뉴얼] 파이썬입문과 크롤링기초 부트캠프 [파이썬, 웹, 데이터 이해 기본까지] (업데이트)
안녕하세요 수업 듣는중 문제 푸는 21번 강의에서 'str' object is not callable 나와서 알려주신대로 코드를 작성했다가, 안되서 강의자료 복사에서 실행해도 error 납니다. 이런 경우에는 왜 이런 버그가 나오나요? 문제를 풀다가 1번도 아니고 여러 문제들이 계속 같은 문구가 나와서 이렇게 문의드립니다. 답변 주시면 감사하겠습니다 수업 21번 - 본 강의 영상 학습 관련 문의에 대해 답변을 드립니다. (어떤 챕터 몇분 몇초를 꼭 기재부탁드립니다) - 이외의 문의등은 평생강의이므로 양해를 부탁드립니다 - 현업과 병행하는 관계로 주말/휴가 제외 최대한 3일내로 답변을 드리려 노력하고 있습니다 - 잠깐! 인프런 서비스 운영(다운로드 방법포함) 관련 문의는 1:1 문의하기를 이용해주세요.
import openai api_key = " " openai.api_key = api_key def ask_gpt(system, prompt, model="gpt-3.5-turbo"): completion = openai.ChatCompletion.create( model=model, messages=[ {"role": "system", "content": system}, {"role": "user", "content": prompt} ], stream=True ) result = "" for chunk in completion: delta_data = chunk.choices[0].delta if 'role' in delta_data: continue elif 'content' in delta_data: r_text = delta_data['content'] result += r_text print(r_text, end="",flust=True) ask_gpt(system="you are a helpful assistant." , prompt="사과에 관한 글을 써줘") 해당 부분이 작동이 되지 않아서 확인 요청드립니다. api_key 값은 일단 빼두었습니다.
결과 값이 나오긴 하는데 그 위에 붉은색으로 오류.. 인건지 뭔가가 나옵니다.. 내용은 다음과 같은데요 /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/seaborn/axisgrid.py:854: UserWarning: `distplot` is a deprecated function and will be removed in seaborn v0.14.0. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `kdeplot` (an axes-level function for kernel density plots). For a guide to updating your code to use the new functions, please see https://gist.github.com/mwaskom/de44147ed2974457ad6372750bbe5751 func(*plot_args, **plot_kwargs) /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/seaborn/axisgrid.py:854: UserWarning: `distplot` is a deprecated function and will be removed in seaborn v0.14.0. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `kdeplot` (an axes-level function for kernel density plots). For a guide to updating your code to use the new functions, please see https://gist.github.com/mwaskom/de44147ed2974457ad6372750bbe5751 func(*plot_args, **plot_kwargs) /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/seaborn/axisgrid.py:854: UserWarning: `distplot` is a deprecated function and will be removed in seaborn v0.14.0. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `kdeplot` (an axes-level function for kernel density plots). For a guide to updating your code to use the new functions, please see https://gist.github.com/mwaskom/de44147ed2974457ad6372750bbe5751 func(*plot_args, **plot_kwargs) /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/seaborn/axisgrid.py:854: UserWarning: `distplot` is a deprecated function and will be removed in seaborn v0.14.0. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `kdeplot` (an axes-level function for kernel density plots). For a guide to updating your code to use the new functions, please see https://gist.github.com/mwaskom/de44147ed2974457ad6372750bbe5751 func(*plot_args, **plot_kwargs) /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/seaborn/axisgrid.py:854: UserWarning: `distplot` is a deprecated function and will be removed in seaborn v0.14.0. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `kdeplot` (an axes-level function for kernel density plots). For a guide to updating your code to use the new functions, please see https://gist.github.com/mwaskom/de44147ed2974457ad6372750bbe5751 func(*plot_args, **plot_kwargs) /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/seaborn/axisgrid.py:854: UserWarning: `distplot` is a deprecated function and will be removed in seaborn v0.14.0. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `kdeplot` (an axes-level function for kernel density plots). For a guide to updating your code to use the new functions, please see https://gist.github.com/mwaskom/de44147ed2974457ad6372750bbe5751 func(*plot_args, **plot_kwargs) /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/seaborn/axisgrid.py:854: UserWarning: `distplot` is a deprecated function and will be removed in seaborn v0.14.0. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `kdeplot` (an axes-level function for kernel density plots). For a guide to updating your code to use the new functions, please see https://gist.github.com/mwaskom/de44147ed2974457ad6372750bbe5751 func(*plot_args, **plot_kwargs) /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/seaborn/axisgrid.py:854: UserWarning: `distplot` is a deprecated function and will be removed in seaborn v0.14.0. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `kdeplot` (an axes-level function for kernel density plots). For a guide to updating your code to use the new functions, please see https://gist.github.com/mwaskom/de44147ed2974457ad6372750bbe5751 func(*plot_args, **plot_kwargs) /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/seaborn/axisgrid.py:854: UserWarning: `distplot` is a deprecated function and will be removed in seaborn v0.14.0. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `kdeplot` (an axes-level function for kernel density plots). For a guide to updating your code to use the new functions, please see https://gist.github.com/mwaskom/de44147ed2974457ad6372750bbe5751 func(*plot_args, **plot_kwargs) /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/seaborn/axisgrid.py:854: UserWarning: `distplot` is a deprecated function and will be removed in seaborn v0.14.0. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `kdeplot` (an axes-level function for kernel density plots). For a guide to updating your code to use the new functions, please see https://gist.github.com/mwaskom/de44147ed2974457ad6372750bbe5751 func(*plot_args, **plot_kwargs) /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/seaborn/axisgrid.py:854: UserWarning: `distplot` is a deprecated function and will be removed in seaborn v0.14.0. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `kdeplot` (an axes-level function for kernel density plots). For a guide to updating your code to use the new functions, please see https://gist.github.com/mwaskom/de44147ed2974457ad6372750bbe5751 func(*plot_args, **plot_kwargs) /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/seaborn/axisgrid.py:854: UserWarning: `distplot` is a deprecated function and will be removed in seaborn v0.14.0. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `kdeplot` (an axes-level function for kernel density plots). For a guide to updating your code to use the new functions, please see https://gist.github.com/mwaskom/de44147ed2974457ad6372750bbe5751 func(*plot_args, **plot_kwargs) /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/seaborn/axisgrid.py:854: UserWarning: `distplot` is a deprecated function and will be removed in seaborn v0.14.0. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `kdeplot` (an axes-level function for kernel density plots). For a guide to updating your code to use the new functions, please see https://gist.github.com/mwaskom/de44147ed2974457ad6372750bbe5751 func(*plot_args, **plot_kwargs) /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/seaborn/axisgrid.py:854: UserWarning: `distplot` is a deprecated function and will be removed in seaborn v0.14.0. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `kdeplot` (an axes-level function for kernel density plots). For a guide to updating your code to use the new functions, please see https://gist.github.com/mwaskom/de44147ed2974457ad6372750bbe5751 func(*plot_args, **plot_kwargs) /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/seaborn/axisgrid.py:854: UserWarning: `distplot` is a deprecated function and will be removed in seaborn v0.14.0. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `kdeplot` (an axes-level function for kernel density plots). For a guide to updating your code to use the new functions, please see https://gist.github.com/mwaskom/de44147ed2974457ad6372750bbe5751 func(*plot_args, **plot_kwargs) /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/seaborn/axisgrid.py:854: UserWarning: `distplot` is a deprecated function and will be removed in seaborn v0.14.0. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `kdeplot` (an axes-level function for kernel density plots). For a guide to updating your code to use the new functions, please see https://gist.github.com/mwaskom/de44147ed2974457ad6372750bbe5751 func(*plot_args, **plot_kwargs) /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/seaborn/axisgrid.py:854: UserWarning: `distplot` is a deprecated function and will be removed in seaborn v0.14.0. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `kdeplot` (an axes-level function for kernel density plots). For a guide to updating your code to use the new functions, please see https://gist.github.com/mwaskom/de44147ed2974457ad6372750bbe5751 func(*plot_args, **plot_kwargs) 강좌 내용과 같게 결과는 나오는데 위처럼 나오는 이유를 모르겠습니다...
1.5 groupby 까지 안막히고 잘 오다가 여기서 막힙니다. df_last.groupby(["지역명"]).mean() 작성했을때 TypeError: agg function failed [how->mean,dtype->object] 에러가 뜹니다. 그런데 이어서 ["평당분양가격"]을 타이핑 하면 정상 결과가 나옵니다. 무슨 문제일까요.,?
수치형은 robustscaler를 사용하려고 하는데여 from sklearn.preprocessing import RobustScaler scaler = RobustScaler() cols = x_train.select_dtypes(exclude='object') for col in cols: x_train[col] = scaler.fit_transform(x_train[col]) x_test[col] = scaler.transform(x_test[col]) 이렇게 하면 ,ValueError: Expected 2D array, got 1D array instead: array=[ 888. 1308. 151. ... 173. 1244. 893.]. Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample. 이런 오류가 납니다... 어떻게 수정해야 하나여
늘 강의 잘 듣고 있습니다! DBSCAN에서 Radius(R)와 Minimum Neighbor number(M)을 가르쳐주시고 Core, Border 개념을 소개해주셨는데 헷갈리는 부분이 있어 질문 드립니다. pdf 자료를 보며 R에 2unit 이렇게 되어 있는데 이 Unit이라는 건 데이터 포인트의 점 크기를 말하는 걸까요? 그리고 정한 M 값 이상의 데이터 포인트들이 R 안에 들어오면 Core고 Border는 R안에 데이터포인트가 M 보다 작은 수만큼 있는 경우, 다른 Core가 R 안에 있는 경우를 말하는 건가요? (R안에 다른 데이터포인트가 하나라도 있으면 Border인지 궁금합니다)
(1) Feature scaling 실습 강의를 듣다가 궁금한 점이 있어 질문드립니다! 타이타닉 자료에서 나이에 대한 결측치는 중간값으로 처리하고, Embarked의 경우 drop을 하는 걸로 알려주셨는데요 🙂 원래 없는 값인데 중간 값으로 결측치를 채워주는 것도 그렇구 다른 FEATURE값이 있는데 결측치가 있는 row라고 지워버리는 것도 그렇고 결측치가 주는 영향이 그만큼 크기 때문인가요?? 값이 비어있는 것보다는 평균으로라도 채워놓는 게 좋은 건지, 다른 feature 정보가 있더라도 결측치가 있는 row는 지우는 게 좋은 건지 feature engineering에 대해 제대로 이해하지 못한 것 같아 여쭤봅니다! (2) SKEW된 FARE에 log를 취해주셨는데요! 사실 그래프만 보면 parch도 sibsb도 한 쪽으로 쏠려있고 한 쪽이 많은 느낌인데 왜 fare만 skew로 log를 취해주신 걸까요? (3) 교재에서는 train_test_split 부분을 이렇게 해주셨는데요! X_train = df_titanic[:700] X_test = df_titanic[700:] y_train = X_train.pop('Survived') y_test = X_test.pop('Survived') X_train, X_test에서 survived 부분을 안 빼줘도 되는 건가요?? 늘 감사합니다!!
타이타닉 탑승자 자료로 Feature scaling을 실습하는 강의에서, heatmap을 그리는 부분을 듣고 있는데요! g=sns.heatmap(df_titanic.corr(numeric_only=True),annot=True,cmap='coolwarm') 교재에는 이렇게 되어 있는데 실제 강의에서는 numeric_only=True 부분을 작성하지 않고도 똑같이 그리셨더라구요! 교재 코드에 해당 부분이 있는 이유가 궁금해 여쭤봅니다! 감사합니다 :)