import pandas as pd
import numpy as np
path = "https://github.com/mmouty/energynds/blob/main/energynds/assets/datasets/auto.csv"
df = pd.read_csv(path)
print("The first 5 rows of the dataframe")
df.head(5)
print("The last 5 rows of the dataframe")
df.tail(5)
headers = ["symboling","normalized-losses","make","fuel-type","aspiration", "num-of-doors","body-style",
"drive-wheels","engine-location","wheel-base", "length","width","height","curb-weight","engine-type",
"num-of-cylinders", "engine-size","fuel-system","bore","stroke","compression-ratio","horsepower",
"peak-rpm","city-mpg","highway-mpg","price"]
print("headers\n", headers)
df.columns = headers
df.head(3)
df.to_csv("auto_with_headers.csv", index=False)
df.describe(include = "all")
df.info()