You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When checking and fixing column names for writing a Stata file, there is an added check to see whether the renamed column also needs to be renamed under the _convert_dates class attribute (a dict). However, there is a missing condition to see if the renamed column name is actually listed under the _convert_dates dict, and so it raises KeyError every time such variable name is not found in the dict keys. A simple condition such as that below would probably do the trick: if c != o and o in self._convert_dates:
When checking and fixing column names for writing a Stata file, there is an added check to see whether the renamed column also needs to be renamed under the _convert_dates class attribute (a dict). However, there is a missing condition to see if the renamed column name is actually listed under the _convert_dates dict, and so it raises KeyError every time such variable name is not found in the dict keys. A simple condition such as that below would probably do the trick:
if c != o and o in self._convert_dates:
pandas/pandas/io/stata.py
Line 2614 in ca91dd4
The text was updated successfully, but these errors were encountered: