0
koalas_img = ks.read_spark_io(path="/mnt/databricks/demo/CarClassification/cars_train/009*.jpg", format="binaryfile")
koalas_img.shape
Out[16]: (100, 4)
type(koalas_img)
Out[17]: databricks.koalas.frame.DataFrame
koalas_img.columns
Out[18]: Index(['path', 'modificationTime', 'length', 'content'], dtype='object')
koalas_img.iloc[0]
SparkPandasNotImplementedError: .iloc requires numeric slice or conditional boolean Index, got [0] You are trying to use pandas function .iloc[..., ...], use spark function select, where

As per the documentation in https://databricks.com/notebooks/cnn-car-class/koalas-augmentation.html iloc function can be used with koalas dataframe.

  • Hi @nimit Kothari, If my answer is helpful for you, you can accept it as answer( click on the check mark beside the answer to toggle it from greyed out to filled in.). This can be beneficial to other community members. Thank you. – CHEEKATLAPRADEEP Jul 03 '20 at 10:46

1 Answers1

2

Make sure all the Python (PyPi) dependencies are installed.

%sh

pip install opencv-python-headless

pip install Keras

pip install tensorflow

pip install koalas

pip install h5py

pip install Pillow

I'm able to successfully run the notebook (koalas-augmentation) cells without any issue.

enter image description here

CHEEKATLAPRADEEP
  • 12,191
  • 1
  • 19
  • 42