Заполнить пропущенные значения в метке времени в коалах? - PullRequest
0 голосов
/ 15 апреля 2020

У меня есть пропущенные значения в столбце datetime в кадре данных koalas,

cleaned_Data['Valuation_Date'].head()
(1) Spark Jobs
Out[12]: 0     1/01/2013 0:00
1    16/08/2013 0:00
2    16/08/2013 0:00
3               None
4               None
Name: Valuation_Date, dtype: object

Я конвертирую в datatime koalas, но это не работает, из-за ошибки

cleaned_Data["Valuation_Date1"] = ks.to_datetime(cleaned_Data["Valuation_Date"], errors='coerce')
cleaned_Data['Valuation_Date1'].head()

org.apache.spark.SparkException: Exception thrown in awaitResult: 
Py4JJavaError                             Traceback (most recent call last)
/databricks/python/lib/python3.7/site-packages/IPython/core/formatters.py in __call__(self, obj)
    700                 type_pprinters=self.type_printers,
    701                 deferred_pprinters=self.deferred_printers)
--> 702             printer.pretty(obj)
    703             printer.flush()
    704             return stream.getvalue()

/databricks/python/lib/python3.7/site-packages/IPython/lib/pretty.py in pretty(self, obj)
    400                         if cls is not object \
    401                                 and callable(cls.__dict__.get('__repr__')):
--> 402                             return _repr_pprint(obj, self, cycle)
    403 
    404             return _default_pprint(obj, self, cycle)

/databricks/python/lib/python3.7/site-packages/IPython/lib/pretty.py in _repr_pprint(obj, p, cycle)
    695     """A pprint that just redirects to the normal repr function."""
    696     # Find newlines and replace them with p.break_()
--> 697     output = repr(obj)
    698     for idx,output_line in enumerate(output.splitlines()):

Любая помощь при ошибке пожалуйста, если нет пропущенных значений, то же самое работает.

...