커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
답변 완료
get_salary('카카오') 등록시 에게 발생
undefined주차
북마크
이*규
댓글
1
추천
0
조회수
11
조회수
11
답변 완료

* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.

* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.


def get_salary(name):

  corp_code = df_listed[df_listed['corp_name'] == 'name'].iloc[0,0]

  data = dart_fss.api.info.indvdl_by_pay(corp_code, '2021', '11011')


  df = pd.DataFrame(data['list'])


  df = df[['corp_name','nm','ofcps','mendng_totamt']]


  df.columns = ['기업명','이름','역할','보수']


  df['보수'] = pd.to_numeric(df['보수'].str.replace(',',''))


  return df


get_salary('카카오')

---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-25-14fefb54bb09> in <cell line: 1>()
----> 1 get_salary('카카오')


2 frames

/usr/local/lib/python3.10/dist-packages/pandas/core/frame.py in _get_value(self, index, col, takeable)
   3913         if takeable:
   3914             series = self._ixs(col, axis=1)
-> 3915             return series._values[index]
   3916 
   3917         series = self._get_item_cache(col)

IndexError: index 0 is out of bounds for axis 0 with size 0



스파르타 즉문즉답







취소
 공유
취소
댓글 0
댓글 알림
나의얼굴