I'm missing the access of the whole row in the DataFrame.apply function, like
df = pd.DataFrame({"date":pd.to_datetime(['2012-01-01','2012-01-02']),
"hour": [5, 5],
})
print(df)
df['datetime'] = df.apply(lambda x: x['date'].replace(hour=x['hour']), axis=1)
print(df)
Prints out:
date hour
0 2012-01-01 5
1 2012-01-02 5
date hour datetime
0 2012-01-01 5 2012-01-01 05:00:00
1 2012-01-02 5 2012-01-02 05:00:00
We should implement DataFrame.apply(row_func, axis=1) using the UDFs.
related to #65
I'll start work on this soon. Maybe it will be impossible to support exactly same API but should be able to provide workaround.
I made a PR https://github.com/databricks/koalas/pull/1259
Most helpful comment
I'll start work on this soon. Maybe it will be impossible to support exactly same API but should be able to provide workaround.