Posts

Showing posts from June, 2022

First Library: Pandas in Python

Image
Pandas is an open-source library. P andas is a   It provides various data structures and operations for manipulating numerical data and time series. This library is built on top of the NumPy library. Pandas is fast and it has high performance & productivity for users. Pandas data table representation: How to install Pandas in Python? Install pandas via pip--> pip install pandas How to import Pandas? import pandas  How to Create a data frame using Pandas? import pandas as pan df = pan.DataFrame(     {         "Name": [             "Braund, Mr. Owen Harris",             "Allen, Mr. William Henry",             "Bonnell, Miss. Elizabeth",         ],         "Age": [22, 35, 58],         "Sex": ["male", "male", "female"],     } ) print(df) When using a Python dictionary of lists, the dictionary keys will be used as column headers and the values in each list as columns of the Data frame. Each colu

FuzzyWuzzy Python library

Image
In this article, we see the FuzzyWuzzy library. The name of this library something weird and funny, but it is advantageous. It has a unique way to compare both strings and returns the score out of 100 of how much string is matched. FuzzyWuzzy is a library of  Python which is used for string matching. Fuzzy string matching is the process of finding strings that match a given pattern.   There are many methods of comparing strings in python. Some of the main methods are: Using regex Simple compare Using difflib To work with this library, we need to install it in our Python environment. pip install fuzzywuzzy pip install python-Levenshtein  First, understand the following methods of fuzzywuzzy library: Import these modules:- from fuzzywuzzy import fuzz   from fuzzywuzzy import process  Fuzz Module:    The fuzz module is used to compare the two given strings at a time. It returns a score out of 100 after comparison using the different methods.   Fuzz.ratio(): It is one of the important meth