Skip to content

Instantly share code, notes, and snippets.

@hucodelab
Created April 30, 2022 03:49
Show Gist options
  • Select an option

  • Save hucodelab/0291e720270dceb715394cb65335453d to your computer and use it in GitHub Desktop.

Select an option

Save hucodelab/0291e720270dceb715394cb65335453d to your computer and use it in GitHub Desktop.
# load a toy dataframe from https://scikit-learn.org/stable/datasets/toy_dataset.html
cancer = load_breast_cancer()
# convert the data into a numpy array
cancer_data = np.array(cancer.data)
# converting to pandas dataframe
df_cancer = pd.DataFrame(cancer_data, columns=cancer.feature_names)
df_cancer.head()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment