<jupyter_start><jupyter_text>Data Analysis with Python  Data AcquisitionData source: https://archive.ics.uci.edu/ml/machine-learning-databases/autos/imports-85.dataData type: csv<jupyter_code># import pandas library
import pandas as pd<jupyter_output><empty_output><jupyter_text>Read DataDataset is stored at https://s3-api.us-geo.objectstorage.softlayer.net/cf-courses-data/CognitiveClass/DA0101EN/auto.csv<jupyter_code># read online file
url = "https://s3-api.us-geo.objectstorage.softlayer.net/cf-courses-data/CognitiveClass/DA0101EN/auto.csv"

# assign values to dataframe 'df'
df = pd.read_csv(url, header=None)

# show first 5 rows from dataframe
print("The first 5 rows of the dataframe")
df.head(5)<jupyter_output>The first 5 rows of the dataframe<jupyter_text>Add headersInfo about headers names is available at https://archive.ics.uci.edu/ml/datasets/Automobile<jupyter_code># create headers list
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"]

df.columns = headers
df.head(10)<jupyter_output><empty_output><jupyter_text>Clean dataRemove entries with missing values on "price" column<jupyter_code># drop rows from column "price" with missing values
df.dropna(subset=["price"], axis=0)<jupyter_output><empty_output><jupyter_text>Save DatasetStore imported dataset in a local file automobile.csv<jupyter_code>filename = "automobile.csv"
df.to_csv(filename, index=False)<jupyter_output><empty_output><jupyter_text>Basic Insight of Dataset  Data Types<jupyter_code>df.dtypes<jupyter_output><empty_output><jupyter_text>Describe<jupyter_code>df.describe()
# describe all the columns in 'df'
df.describe(include = "all")<jupyter_output><empty_output><jupyter_text>Info<jupyter_code># shows top 30 and bottom 30 rows
df.info<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13758389261744966, 'fraction_numerical': 0.01102588686481304, 'mean_word_length': 7.381526104417671, 'pattern_counts': {'":': 0, '<': 32, '<?xml version=': 0, '>': 32, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '8', 'dir': 'jupyter-structured-clean-dedup', 'id': '304868', 'license': 'MIT', 'n_tokens_mistral': 743, 'n_tokens_neox': 710, 'n_words': 127, 'path': 'data-analysis/importing-datasets.ipynb', 'repo_name': 'PortoRAF/ibm-data-science', 'size': '2086'}