File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2207,14 +2207,14 @@ def _convert_datetime_to_stata_type(fmt: str) -> np.dtype:
2207
2207
def _maybe_convert_to_int_keys (convert_dates : dict , varlist : list [Hashable ]) -> dict :
2208
2208
new_dict = {}
2209
2209
for key , value in convert_dates .items ():
2210
- if not value .startswith ("%" ): # make sure proper fmts
2210
+ if not convert_dates [ key ] .startswith ("%" ): # make sure proper fmts
2211
2211
convert_dates [key ] = "%" + value
2212
2212
if key in varlist :
2213
- new_dict [varlist .index (key )] = value
2213
+ new_dict [varlist .index (key )] = convert_dates [ key ]
2214
2214
else :
2215
2215
if not isinstance (key , int ):
2216
2216
raise ValueError ("convert_dates key must be a column or an integer" )
2217
- new_dict [key ] = value
2217
+ new_dict [key ] = convert_dates [ key ]
2218
2218
return new_dict
2219
2219
2220
2220
You can’t perform that action at this time.
0 commit comments