Skip to content

Introduction to Data Science in Python

Run the hidden code cell below to import the data used in this course.


1 hidden cell

Take Notes

Add notes about the concepts you've learned and code cells with code you want to keep.

Add your notes here

# Stacked bar chart
plt.bar(x-axis,y-axis1)
plt.bar(x-axis,y-axis2,bottom=y-axis1)
#normalizing in hist
plt.hist(data,density=True)
#changing number of bins
plt.hist(data,bins=##))
#changing the range
plt.hist(data,range=(min,max)))

Selecting column

  • df.column_name
  • df['column_name']

Selecting rows with logic

  • df[df.column_name logical_condition] EX.: df[df.price>20.0]

Logical operators for arrays

np.logical_and(checks) np.logical_or(checks) np.logical_not(checks)