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.

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!