
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
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
