Skip to main content

Command Palette

Search for a command to run...

Mastering Data Visualization with Pandas and Matplotlib πŸ“ŠπŸŽ¨

Published
β€’2 min readβ€’View as Markdown
Mastering Data Visualization with Pandas and Matplotlib πŸ“ŠπŸŽ¨
P

πŸ‘‹ Hello! I'm passionate about DevOps and have over 1+ years of experience in the field. I'm proficient in a variety of cutting-edge technologies and always motivated to expand my knowledge and skills. Let's connect and grow together!

SKILLS:

πŸ”Ή Languages & Runtimes: Python, Shell Scripting, HCL, YAML πŸ”Ή Cloud Technologies: AWS, Microsoft Azure, GCP πŸ”Ή Infrastructure Tools: Docker, Terraform, AWS CloudFormation πŸ”Ή Other Tools: Linux, Git and GitHub Actions, Jenkins, Jira, GitLab (beginner), Docker, AWS DevOps πŸ”Ή Web Development: HTML, CSS, Bootstrap, Python, SQL

Job & Responsibilities:

πŸš€ Improved development efficiency by implementing CI/CD pipelines, resulting in a 30% reduction in deployment time on the test server. πŸ”’ Strengthened deployment and testing reliability by utilizing Docker containers and optimizing Dockerfile, reducing development issues on the test server by 20%. βš™οΈ Automated S3 bucket log creation with Shell scripting, eliminating 100% of manual search and saving 2 hours per week. πŸ“… Scheduled EC2 instance start/stop using Lambda functions and Event Bridge, leading to a 25% decrease in infrastructure costs. πŸ”§ Utilized AWS, Linux, Python, Docker, Shell scripting, Terraform, Jenkins Pipelines, and automation to streamline workflows and improve overall system performance.

I'm very detail-oriented and possess strong written and verbal communication skills. As a high performer with a possibility mindset, I strive to solve problems using efficient approaches.

Let's Connect & Grow:

If you find my profile suitable for the role you are searching for, please feel free to reach out to me at sumanprasad9766@gmail.com.

Data Visualization with Pandas: An Artful Journey πŸš€

Data Visualization is a powerful means to convey insights effectively. Pandas seamlessly integrates with Matplotlib, one of the most popular plotting libraries in Python, offering a versatile toolkit for creating impactful visualizations.

Integration with Matplotlib πŸ“ˆ

Pandas simplifies the process of data visualization by integrating seamlessly with Matplotlib.

Use Case: Integrating with Matplotlib

# Example
import pandas as pd
import matplotlib.pyplot as plt

# Create a DataFrame
data = {'Month': ['Jan', 'Feb', 'Mar', 'Apr', 'May'],
        'Sales': [100, 120, 90, 150, 80]}
df = pd.DataFrame(data)

# Plotting with Pandas and Matplotlib
df.plot(x='Month', y='Sales', kind='bar', color='skyblue')
plt.title('Monthly Sales')
plt.xlabel('Month')
plt.ylabel('Sales')
plt.show()

Plotting Data πŸ“‰

Pandas provides a variety of plot types to suit different types of data.

Use Case: Line Plot

# Example
import pandas as pd
import matplotlib.pyplot as plt

# Create a DataFrame
data = {'Year': [2010, 2012, 2014, 2016, 2018],
        'Population': [10, 12, 15, 18, 20]}
df = pd.DataFrame(data)

# Line plot with Pandas and Matplotlib
df.plot(x='Year', y='Population', kind='line', marker='o', linestyle='-', color='green')
plt.title('Population Growth Over Years')
plt.xlabel('Year')
plt.ylabel('Population (in millions)')
plt.show()

Use Case: Scatter Plot

# Example
import pandas as pd
import matplotlib.pyplot as plt

# Create a DataFrame
data = {'Height': [160, 175, 150, 180, 165],
        'Weight': [60, 70, 55, 80, 68]}
df = pd.DataFrame(data)

# Scatter plot with Pandas and Matplotlib
df.plot(x='Height', y='Weight', kind='scatter', color='purple')
plt.title('Height vs. Weight')
plt.xlabel('Height (cm)')
plt.ylabel('Weight (kg)')
plt.show()

Customizing Plots 🎨

Customizing plots allows you to tailor visualizations to your specific needs.

Use Case: Customizing a Bar Chart

# Example
import pandas as pd
import matplotlib.pyplot as plt

# Create a DataFrame
data = {'City': ['New York', 'San Francisco', 'Los Angeles'],
        'Population': [8, 1, 4]}
df = pd.DataFrame(data)

# Customizing a bar chart with Pandas and Matplotlib
ax = df.plot(x='City', y='Population', kind='bar', color=['blue', 'orange', 'green'])
ax.set_title('Population of Major Cities')
ax.set_xlabel('City')
ax.set_ylabel('Population (in millions)')
plt.show()

Data visualization in Pandas, coupled with the flexibility of Matplotlib, empowers you to create expressive and informative visualizations. Whether you're conveying trends over time, comparing data points, or customizing the aesthetics of your plots, Pandas provides a user-friendly interface for turning data into compelling visuals. πŸŒˆπŸš€

More from this blog

D

DeployToCloud

405 posts

πŸ‘‹ Welcome to my Hashnode blog! I'm a DevOps Engineer with 2+ years of experience. Join ~5k followers and explore 320+ blogs on Python, AWS, Docker, Jenkins, Linux, and more. Let's connect & grow πŸš€