Skip to content

Instantly share code, notes, and snippets.

@johnwcothran
Last active February 20, 2018 22:15
Show Gist options
  • Save johnwcothran/a73b944dc9a5780c97f5aaaf60196be2 to your computer and use it in GitHub Desktop.
Save johnwcothran/a73b944dc9a5780c97f5aaaf60196be2 to your computer and use it in GitHub Desktop.
import pandas as pd
import seaborn as sns
weekData = [
{ "name": "John", "distance": 35.4, "high-speed-running": 3.65, "week": 1 },
{ "name": "Mike", "distance": 32.9, "high-speed-running": 3.77, "week": 1 },
{ "name": "Chad", "distance": 27.2, "high-speed-running": 3.02, "week": 1 },
{ "name": "Phil", "distance": 20.5, "high-speed-running": 2.01, "week": 1 },
{ "name": "Tyler", "distance": 15.3, "high-speed-running": 2.09, "week": 1 },
{ "name": "John", "distance": 38.4, "high-speed-running": 4.95, "week": 2 },
{ "name": "Mike", "distance": 37.9, "high-speed-running": 4.97, "week": 2 },
{ "name": "Chad", "distance": 33.2, "high-speed-running": 4.42, "week": 2 },
{ "name": "Phil", "distance": 25.5, "high-speed-running": 3.91, "week": 2 },
{ "name": "Tyler", "distance": 19.3, "high-speed-running": 3.09, "week": 2 },
]
weekDf = pd.DataFrame(data=weekData)
plot = sns.lmplot(x='high-speed-running', y='distance', data=weekDf)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment