Intro to Google Colab
Intro to Google Colab
Google Colab
• Free, cloud based environment
• Allows to execute python code
• Working with machine learning models, analyse data
• No need to install python and environment setup
Advantages
• Free access to CPU, GPU, TPU
• Collaborative work
• Integration with Google drive
• Pre-installed libraries
Python Libraries
• In Python, libraries are collections of pre-written code.
• Libraries provide reusable functionality for common tasks
• No need to write code from scratch
• These libraries include modules, functions, classes, and variables that
help you save time and effort.
• They cover a wide range of tasks like data manipulation, mathematical
computations, machine learning, web scraping, and more.
Important Libraries in Python for
data science
1. Numpy
• Purpose: Essential for numerical operations, including working with
arrays and matrices
• Features:
• Efficient handling of large datasets
• Supports a wide variety of mathematical functions
Important Libraries in Python for
data science…
2. Pandas
• Purpose: Data manipulation and analysis
• Features:
• DataFrames for structured data
• Handling missing data, merging/joining datasets, and reshaping
• Time series data support and efficient data filtering
Important Libraries in Python for
data science…
3. Matplotlib
• Purpose: Data Visualization
• Features:
• Create static, animated, and interactive plots
• Works well for 2D plotting (histograms, line charts, scatter plots, etc.)
Important Libraries in Python for
data science…
4. Scikit-learn
• Purpose: Machine-learning
• Features:
• Tools for classification, regression, clustering, and dimensionality reduction.
• Built-in datasets for practice.
• Simple and efficient tools for data mining and data analysis.
Google Colab
Connect with
+ code to make a new cell for CPU or GPU
writing another code
1. ID is variable name,
2. Values are entered within square brackets, known as python lists.
Data Table Making
1. Here data is dataframe object of
pandas
2. Data[‘ID’] defines a new
columns, and its value are
assigned by the assignment
operator “=“
3. Same steps are repeated for the
other columns
Print data