안녕하세요 삭제기능 구현 강의를 보다가 조금 어려운 부분이 있어 질문을 드립니다. canvas.js 파일에서 getCanvases함수와 createCanvas함수는 canvases.get, canvases.post앞에 return이 붙었고 이건 다른 곳에서 사용할 수 있다라고 알고 있습니다. 그럼 deleteCanvas는 왜 똑같이 return을 사용하지 않고 async await을 사용했는지 궁금하고 왜 위에 두 함수는 return을 사용했는지도 궁금합니다.
작업형1 모의문제3 문제9관련 질문입니다. 해설을 보고 코드를 작성했는데, 결과값이 11이 아니라 np.int32(11)로 나옵니다. 무엇이 잘못되었을까요? 문제9 구독(subscribed) 월별로 데이터 개수를 구한 뒤 가장 작은 구독 수가 있는 월을 구하시오 # your code import pandas as pd df = pd.read_csv("https://raw.githubusercontent.com/lovedlim/inf/main/p1/members.csv") df['subscribed']=pd.to_datetime(df['subscribed']) df['year']= df['subscribed'].dt.year df['month']= df['subscribed'].dt.month df['day'] =df['subscribed'].dt.day df= df.groupby('month').count() df.sort_values('subscribed').index[0] =>np.int32(11)
'tailwind'은(는) 내부 또는 외부 명령, 실행할 수 있는 프로그램, 또는 배치 파일이 아닙니다. 떠서 수동으로 tailwind.config.js 파일 추가하고 index.css랑 기타 설정하고 실행했더니 ERROR in ./src/App.css (./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[2]!./node_modules/source-map-loader/dist/cjs.js!./src/App.css) Module build failed (from ./node_modules/postcss-loader/dist/cjs.js): Error: It looks like you're trying to use tailwindcss directly as a PostCSS plugin. The PostCSS plugin has moved to a separate package, so to continue using Tailwind CSS with PostCSS you'll need to install @tailwindcss/postcss and update your PostCSS configuration. at Le (C:\react\react_springboot\node_modules\tailwindcss\dist\lib.js:36:1984) at LazyResult.runOnRoot (C:\react\react_springboot\node_modules\postcss\lib\lazy-result.js:361:16) at LazyResult.runAsync (C:\react\react_springboot\node_modules\postcss\lib\lazy-result.js:290:26) at LazyResult.async (C:\react\react_springboot\node_modules\postcss\lib\lazy-result.js:192:30) at LazyResult.then (C:\react\react_springboot\node_modules\postcss\lib\lazy-result.js:436:17) ERROR in ./src/index.css (./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[2]!./node_modules/source-map-loader/dist/cjs.js!./src/index.css) Module build failed (from ./node_modules/postcss-loader/dist/cjs.js): Error: It looks like you're trying to use tailwindcss directly as a PostCSS plugin. The PostCSS plugin has moved to a separate package, so to continue using Tailwind CSS with PostCSS you'll need to install @tailwindcss/postcss and update your PostCSS configuration. at Le (C:\react\react_springboot\node_modules\tailwindcss\dist\lib.js:36:1984) at LazyResult.runOnRoot (C:\react\react_springboot\node_modules\postcss\lib\lazy-result.js:361:16) at LazyResult.runAsync (C:\react\react_springboot\node_modules\postcss\lib\lazy-result.js:290:26) at LazyResult.async (C:\react\react_springboot\node_modules\postcss\lib\lazy-result.js:192:30) at LazyResult.then (C:\react\react_springboot\node_modules\postcss\lib\lazy-result.js:436:17) 위 오류가 뜨네요 ㅜ
이렇게 발견된 테스트가 없다면서 8:39 화면처럼 테스트확장에 리스트가 출력되지않습니다.. 브랜치받고 npm ci 까지 한 상태입니다. 커서 ide 참고로 0.2.42 버전 없어서 제일낮은 0.3 버전사용해도 못찾습니다 .. Vitest v0.33.0 is not supported. Vitest v1.4.0 or newer is required. 이렇게 출려되는데 버전을 올릴까요 ?
안녕하세요! React로 프로젝트를 진행할 때 여러 함수들(이벤트 핸들러나 로직 처리 함수 등)을 구현하게 되는데, 이런 함수들을 어느 위치에서 정의하고 관리하는 것이 좋은지 궁금합니다. 예를 들어, B 컴포넌트 안에 A 컴포넌트가 있고, A에서 어떤 이벤트 함수가 필요하다면 그 함수를 B에서 정의하고 props로 A에 전달하는 식으로 처리하는 것이 React에서 일반적인 방식인가요? 그리고 만약 그 함수가 여러 컴포넌트에서 재사용되어야 한다면, 이들 컴포넌트의 공통 상위 컴포넌트까지 올라가서 정의한 후 각 컴포넌트에 전달하는 방식이 맞는지도 궁금합니다. 혹시 더 좋은 구조나 패턴이 있다면 조언 주시면 감사하겠습니다!
✅ 모든 질문들은 슬랙 채널에서 답변드리고 있습니다. 💡 ”로펀의 인프런 상담소” 슬랙 채널 가입하기 💡 평일중에는 퇴근 이후(저녁 7시)에 답변을 받아보실 수 있고, 주말중에는 상시 답변드리고 있습니다. 모듈 에러가 뜨는데 수파베이스 설치를 잘못 한 것일까요? 검색해서 이리 저리 해보아도 잘 해결이 되지 않네요. 도와주세요~
문제3을 풀다가 궁금한 부분이 생겨서 질문합니다. f3 컬럼의 결측치는 0, silver는 1, gold는 2, vip는 3 으로 변환하는 과정에서 1,2,3을 문자형으로 했을 때는 제대로 나오는데, 숫자형으로 진행하면 오류가 납니다. 아래 제 제가 작성한 코드와 오류 내용입니다. # your code import pandas as pd df = pd.read_csv("https://raw.githubusercontent.com/lovedlim/inf/main/p1/members.csv") #views 컬럼에 결측치가 있는 데이터(행)을 삭제하고, # print(df.isnull().sum()) # print(df.shape) df=df.dropna(subset=['views']) # print(df.shape) # f3 컬럼의 결측치는 0, silver는 1, gold는 2, vip는 3 으로 변환한 후 # print(df.head(10)) df['f3']=df['f3'].fillna(0) df['f3']=df['f3'].replace('silver',1) df['f3']=df['f3'].replace('gold',2) df['f3']=df['f3'].replace('vip',3) # print(df.head(10)) #총 합을 정수형으로 출력하시오 # print(df.info()) df['f3']=df['f3'].astype('int') # print(df.info()) print(sum(df['f3'])) 출력값 =>133 <ipython-input-136-3e83f178c7e6>:20: FutureWarning: Downcasting behavior in `replace` is deprecated and will be removed in a future version. To retain the old behavior, explicitly call `result.infer_objects(copy=False)`. To opt-in to the future behavior, set `pd.set_option('future.no_silent_downcasting', True)` df['f3']=df['f3'].replace('vip',3) 마지막 방법으로 알려주신 sum의 방법의 경우 문제에서 제시하는 값을 변환하고 총 합을 출력하라는 지시에서 값을 실제로 변환하지는 않은 것 같은데.. 답만 맞으면 괜찮은 걸까요? # your code import pandas as pd df = pd.read_csv("https://raw.githubusercontent.com/lovedlim/inf/main/p1/members.csv") #views 컬럼에 결측치가 있는 데이터(행)을 삭제하고, # print(df.isnull().sum()) # print(df.shape) df=df.dropna(subset=['views']) # print(df.shape) # f3 컬럼의 결측치는 0, silver는 1, gold는 2, vip는 3 으로 변환한 후 r1=sum(df['f3']=='silver')*1 r2=sum(df['f3']=='gold')*2 r3=sum(df['f3']=='vip')*3 print(r1+r2+r3) => 133
안녕하세요. 현재 섹션 3 [작업형1] 판다스 updated 2025.4를 학습중입니다. 판다스 6,7은 시계열 데이터 인데.. 자료에는 ["시계열 데이터" 부분은 마지막으로 옮겼습니다.]고 되어있고 Section19~21 내용은 어떤 강의를 보아야 하는지 모르겠습니다.