Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created October 24, 2020 06:45
Show Gist options
  • Save amankharwal/dc205217d10aa76b2300ab4b24e4e985 to your computer and use it in GitHub Desktop.
Save amankharwal/dc205217d10aa76b2300ab4b24e4e985 to your computer and use it in GitHub Desktop.
main_tags = ['Computer Science',
'Mathematics',
'Physics',
'Statistics']
countTagsTrain = pd.DataFrame(train[main_tags].sum(axis = 0) / len(train))
countTagsTest = pd.DataFrame(test[main_tags].sum(axis = 0) / len(test))
trace0 = go.Bar(x = countTagsTrain.index, y = countTagsTrain[0],name = 'Train Set')
trace1 = go.Bar(x = countTagsTest.index, y = countTagsTest[0],name = 'Test Set')
fig = go.Figure([trace0,trace1])
fig.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment