cancel
Showing results for 
Search instead for 
Did you mean: 
Machine Learning
Dive into the world of machine learning on the Databricks platform. Explore discussions on algorithms, model training, deployment, and more. Connect with ML enthusiasts and experts.
cancel
Showing results for 
Search instead for 
Did you mean: 

Pandas options

JamieCh
New Contributor

Hi All,

Per this post's suggestion:

https://towardsdatascience.com/a-solution-for-inconsistencies-in-indexing-operations-in-pandas-b76e1... 

I put the following code in Databricks notebook:

import pandas as pd
pd.set_option('mode.copy_on_write', True)

 I get the following error:

OptionError: "No such keys(s): 'mode.copy_on_write'"
1 REPLY 1

Kaniz_Fatma
Community Manager
Community Manager

Hi @JamieChThe error you're encountering is because pandas have no option. The set_option function in pandas is used to change the default number of rows to display or to change the precision of the floating point numbers. However, 'mode.copy_on_write' is not a valid key for this function. This is why you're seeing the error message "No such keys(s): 'mode.copy_on_write'". The code you are trying to run seems to be incorrect. I recommend reviewing your code to ensure you're using the correct options with pandas. set_option function.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group