import pandas as pd
import numpy as np
import cudf
print(cudf.__version__) # 0.14.0a+4705.gb985381
a = np.arange(3., dtype='float32')
a[0] = np.nan
pdf = pd.DataFrame({'a':a})
print(pdf)
# a
# 0 NaN
# 1 1.0
# 2 2.0
cdf = cudf.from_pandas(pdf)
print (cdf)
# a
# 0 null
# 1 1.0
# 2 2.0
ncdf = cudf.from_pandas(pdf, False)
The last line produces error
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
in
20 print(cdf)
21
---> 22 ncdf = cudf.from_pandas(pdf, False)
TypeError: from_pandas() takes 1 positional argument but 2 were given
Expected behavior
I would expect this flag to be present in this function, and also be able to control NaN → null conversion during df creation from python dict.
Environment overview (please complete the following information)docker pull rapidsai/rapidsai-nightly:0.14-cuda10.1-base-ubuntu18.04-py3.7docker run -p 8888:8888 rapidsai/rapidsai-nightly:0.14-cuda10.1-base-ubuntu18.04-py3.7
Bug description In the latest version of cufd.from_pandas documentation, it is stated that this function has the second parameter
nan_as_null = True
. However, in reality it does not.Steps/Code to reproduce bug
The last line produces error
Expected behavior I would expect this flag to be present in this function, and also be able to control NaN → null conversion during df creation from python dict.
Environment overview (please complete the following information)
docker pull rapidsai/rapidsai-nightly:0.14-cuda10.1-base-ubuntu18.04-py3.7
docker run -p 8888:8888 rapidsai/rapidsai-nightly:0.14-cuda10.1-base-ubuntu18.04-py3.7
Environment details
Click here to see environment details