Tag: Python
All the articles with the tag "Python".
-
Pandas Dataframe: apply method
Calculating Discounts, Taxes, and Total Amount in a DataFrame Suppose you have the following data in a DataFrame: Product Price Category 0 A 100 Electronic 1 B 200 Cloth 2 C 150 Electronic 3 D 300
-
Escape sequences in Pyhon
Escape sequences as in C While reading Automate the Boring Stuff with Python: Practical Programming for Total Beginners, I noticed the existence of raw strings. A raw string is created in such a way
-
Dictionary methods: keys(), values(), and items()
In Python, there are three special methods related to dictionaries that are worth mentioning: keys() , values() , and items() . Interestingly, these methods do not return true lists. They cannot be
-
Sellenium Vs Beautiful Soup
Web scraping is a widely recognized strategy for acquiring information. Before diving into this process, it's crucial to familiarize oneself with two essential tools. Personally, this topic initially
-
Sweetviz error: .iteritems() → .items()
If you install Sweetviz using the command: pip install sweetviz You're going to have this error because change in the Pandas library. So, up to the new release in Sweetviz you can use the following
-
FAKER: Create Unique Random
You have to use: unique.random_int(min=11, max=123) A full example where you can see the creation of a persona is the following: from faker import Faker import pandas as pd fake = Faker() def
-
How to now where is located my current python Virtual enviroment
If you are working in your machine with different virtual env perhaps you wondered "Wait a minute. What environment I'm working on?" There is two ways (I now to know that) Using PIP: pip -V Or using
-
TOX: First steps
Tox is a tool for Python testing. I'm doing my first steps because I found it in the project: Faker, which is: Faker is a Python package that generates fake data for you. Faker Git Hub repository If