Skip to content

Instantly share code, notes, and snippets.

@VedPDubey
Created July 9, 2021 06:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VedPDubey/b6fca48abf9ebf5aed38252cfbe1a6d4 to your computer and use it in GitHub Desktop.
Save VedPDubey/b6fca48abf9ebf5aed38252cfbe1a6d4 to your computer and use it in GitHub Desktop.
n_labels = labels.shape[0]
_, count = np.unique(labels, return_counts=True)
df = pd.DataFrame(data = count)
df['Class Label'] = class_names
df.columns = ['Count','Class-Label']
df.set_index('Class-Label',inplace=True)
df
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment