You might have already seen articles explaining the ‘secret’ repo with a cool ReadMe feature in GitHub but put off actually creating one. I built an app to do most of the work for you 😃
EDA (Exploratory Data Analysis) is one of the first steps performed on a given dataset. It helps us to understand more about our data and gives us an idea of manipulations and cleaning we might have to do. EDA can take anywhere from a few lines to a few hundred lines. In this tutorial, we will look at libraries which help us perform EDA in a few lines
We will use the Titanic Dataset provide by Kaggle. Using Panda’s describe() method, we get the below output
In yesterday’s article, we discussed the following
Today, we will talk about the following
Python supports the following
num = 10if num > 20:
print("If statement")
elif num > 10:
print("Elif statement")
else:
print("Else statement")
Let’s try writing the same code snippet in JavaScript
JavaScript supports the following
As of today, April 17th, I am on day 28 and although it’s been challenging, I am looking forward to the next 72 days.
I have worked with JavaScript previously but it’s been almost 3 years since I have written any JavaScript Code. I have mostly been working with Python and I am all for Python. However, there is no denying that JavaScript is everywhere like EVERYWHERE. As I am re-learning JavaScript, I am going to document my experiences, in case anyone is in a similar boat (Learning JavaScript as a Python Developer).
We will be covering the following in this tutorial
I have borrowed a Tweet from Danny…
We know the fastest way to combine lists. Today we will try to find the fastest way to combine dictionaries
We will be considering the following ways
Assert statements are a great tool for debugging. Given a boolean condition, they will raise an error if the condition evaluates to False. More specifically, it raises an “AssertionError”. We can also include our custom error messages.
# Without Error message
assert boolean Expression#With Error message
assert boolean Expression, "Error Message"
Let’s assume we have a function that calculates the Mass of an object. The Mass of an object must always be positive. We can have a check to ensure this
def calculate_mass(): # Some stuff to calculate the mass mass = 10 if mass > 0: pass else…
We will be using the library Faker
pip install faker
Now let’s import the library and create an instance of “Faker”
from faker import Faker
fake = Faker()
Seeding ensures that the same set of random data is returned during every run. This is very useful when you want to compare functions or models in the same environment without changes in the dataset.
from faker import Faker
Faker.seed(999)
fake = Faker()
print(fake.name())
'''
Wesley Turner
'''print(fake.first_name())
'''
Alexandra
'''print(fake.last_name())
'''
Aguilar
'''print(fake.name_male())
'''
Charles Hanna
'''print(fake.name_female())
'''
Shannon Walker'''
print(fake.name_nonbinary())
'''
Christopher Brennan
'''
from…
In yesterday’s article, we talked about getting started with Beautiful Soup. We discussed the following functions
Today we will try to scrape the data in the table of the worldometer website
Today, we will be discussing web scraping using Python. We will be using the library Beautiful Soup and Requests to scrape Worldometer’s Covid Tracker. Before we get started with scraping the website, let’s install the required packages.
Some Familiarity with HTML and CSS Selectors
pip install beautifulsoup4, requests
Beautiful Soup is an HTML parser, i.e if it is given a string with a bunch of HTML code, it can help us extract specific content we need, for example
How do we get a string with a bunch of HTML code? We…
Articles related to Python, Data Science, APIs | Product Eng Intern @EYCanada|Comp Eng Student @uoft