-
Notifications
You must be signed in to change notification settings - Fork 57
Description
안녕하세요.
p67에 있는 다음의 명령어를 실행하면 에러가 발생합니다.
날짜를 숫자로 변환하여 int_date에 저장한다.
trn["int_date"] = trn["fecha_dato"].map(date_to_int).astype(np.int8)
에러내용입니다.
TypeError Traceback (most recent call last)
in ()
1 # 날짜를 숫자로 변환하여 int_date에 저장한다.
----> 2 trn["int_date"] = trn["fecha_dato"].map(date_to_int).astype(np.int8)
~\Anaconda3\envs\buillee\lib\site-packages\pandas\core\series.py in map(self, arg, na_action)
2996 """
2997 new_values = super(Series, self)._map_values(
-> 2998 arg, na_action=na_action)
2999 return self._constructor(new_values,
3000 index=self.index).finalize(self)
~\Anaconda3\envs\buillee\lib\site-packages\pandas\core\base.py in _map_values(self, mapper, na_action)
1002
1003 # mapper is a function
-> 1004 new_values = map_f(values, mapper)
1005
1006 return new_values
pandas/_libs/src\inference.pyx in pandas._libs.lib.map_infer()
TypeError: date_to_int() takes 0 positional arguments but 1 was given