Week 1 Project
- Data Collection and Preparation. - We can perform web scraping or record data as it is generated.
- Exploratory Data Analysis. - We can use Data Statisytics to derive insights.
- Data Visualization. - We can use graphs and charts to visualize the info.
-
import libraries
import pandas as pd import pandasql # let's us use pandas and sql together. import matplotlib.pyplot as plt
-
Read File. - Read the file
file = read_excel('data.xlsx')
-
Load and Explore the Data Set
- Get the info
file.info()
- Print values
file.head(25) # prints first 25 values. file.tail() # prints last rows.
- Histogram
plt.figure(figsize=(10, 12)) file[column].plot(kind='hist', bins=10, color='skyblue', edgecolor='black')
- Get the info
-
Show Histogram
- Set labels and title
plt.xlabel(column) plt.ylabel('Frequency') plt.title('Instagram Success')
- Show the histogram
plt.show()
- Set labels and title