Skip to content

Instantly share code, notes, and snippets.

@dradecic
Last active August 25, 2019 10:39
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 dradecic/0cf3ac6cea2ca11b3c7831550b268b26 to your computer and use it in GitHub Desktop.
Save dradecic/0cf3ac6cea2ca11b3c7831550b268b26 to your computer and use it in GitHub Desktop.
Python-Bokeh - Gist 1: Imports
import math
import numpy as np
import pandas as pd
from bokeh.embed import components
from bokeh.models import ColumnDataSource, HoverTool, PrintfTickFormatter
from bokeh.plotting import figure
from bokeh.transform import factor_cmap
from flask import Flask, render_template, request
df = pd.read_csv('../data/titanic.csv')
df['Title'] = df['Name'].apply(lambda x: x.split(',')[1].strip().split(' ')[0])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment