Atharva Shah

Atharva Shah

60 Articles Published

Articles by Atharva Shah

Page 5 of 6

Get Financial Data from Yahoo Finance with Python

Atharva Shah
Atharva Shah
Updated on 18-Jul-2023 4K+ Views

Trading, investing, and other financial professionals need access to financial data since investment research is reliant on it. Yahoo Finance, which offers up-to-date market statistics, news, and analysis, is one of the most well-known sources of financial information. Python is a robust and flexible programming language that can be used to extract financial data from Yahoo Finance, so in this post, we'll be utilizing the yfinance package to do just that. Installation and Syntax Before we get started, we need to install the yfinance library, which allows us to access Yahoo Finance data from Python. We can install yfinance using ...

Read More

Find the siblings of tags using BeautifulSoup

Atharva Shah
Atharva Shah
Updated on 09-May-2023 1K+ Views

Data may be extracted from websites using the useful method known as web scraping and a popular Python package for web scraping is BeautifulSoup which offers a simple method for parsing HTML and XML documents, enabling us to extract certain data from web sites. Finding the siblings of a tag is a frequent task while scraping web pages and it can be defined as a tag's siblings are any additional tags that have the same parent as the primary tag. We will go through using BeautifulSoup to locate tags' siblings in this blog article. Installation and Setup To use ...

Read More

Find the size of a Dictionary in Python

Atharva Shah
Atharva Shah
Updated on 09-May-2023 7K+ Views

Working with Python dictionaries, a powerful data type, necessitates an understanding of their size and memory requirements. Assuming you're working with word references in Python, you might have to decide their size to allot adequate memory or perform explicit activities. Fortunately, the size of a dictionary can be determined with the help of Python's built-in len() function. A quick and simple way to gauge the dictionary's contents is to use this function, which returns the total number of key-value pairs in the dictionary. Nonetheless, remember that the size of a word reference can differ contingent upon the quantity of sections ...

Read More

Find the profit and loss in the given Excel sheet using Pandas

Atharva Shah
Atharva Shah
Updated on 09-May-2023 644 Views

Pandas is a popular data manipulation and analysis library in Python that is widely used by data scientists and analysts. It provides several functions for working with data in Excel sheets. One of the most common tasks in analyzing financial data is finding the profit and loss in a given Excel sheet. Setup To handle excel files in Python using Python, you need to install the openpyxl dependency. To do this, open your terminal and type the command − pip install openpyxl After successful installation you can proceed with experimenting with Excel files and spreadsheets. To download the Excel ...

Read More

Find the position of number that is multiple of certain number

Atharva Shah
Atharva Shah
Updated on 09-May-2023 215 Views

Programmers frequently need to locate a number that is a multiple of another number. We have a number of methods available to us in Python to complete this task. This article will examine various approaches to locating a number that is a multiple of a given integer. The use of a for loop, list comprehension, and the filter function are a few of the methods we'll go through and these techniques can be used in a variety of situations when locating the position of a multiple is required. Algorithm Define a list of numbers Iterate through the list and ...

Read More

HandCalcs Module Python

Atharva Shah
Atharva Shah
Updated on 09-May-2023 1K+ Views

HandCalcs is a Python module for automatic Latex report generation from Python code with minimal coding effort. HandCalcs uses Python's symbolic math library to track calculation history and translate it into LaTeX code. It can be used to automatically generate mathematical equations in LaTeX format. This module is a must-have tool for any Python developer who frequently uses LaTeX for technical documentation. Syntax To install HandCalcs, use the following command in the terminal or command prompt − !pip install handcalcs To use HandCalcs in your Python code, first import the handcalcs.render function. This function is used to create a ...

Read More

Full outer join in PySpark dataframe

Atharva Shah
Atharva Shah
Updated on 08-May-2023 2K+ Views

A Full Outer Join is an operation that combines the results of a left outer join and a right outer join. In PySpark, it is used to join two dataframes based on a specific condition where all the records from both dataframes are included in the output regardless of whether there is a match or not. This article will provide a detailed explanation of how to perform a full outer join in PySpark and provide a practical example to illustrate its implementation. Installation and Setup Before we can perform a full outer join in PySpark, we need to set up ...

Read More

Hashing Passwords in Python with BCrypt

Atharva Shah
Atharva Shah
Updated on 18-Apr-2023 12K+ Views

Password hashing is a technique used to store passwords securely. It involves converting plain text passwords into a hashed format that cannot be easily reversed or decrypted. By hashing passwords, even if a hacker gains access to the password database, they will not be able to decipher the passwords. BCrypt is a password hashing algorithm that is considered one of the most secure algorithms for password hashing in Python. BCrypt is designed to be slow, which makes it more difficult for hackers to crack the hashed passwords. In this post, we will explain the syntax, code algorithm, and Python ...

Read More

Formatting containers using format() in Python

Atharva Shah
Atharva Shah
Updated on 18-Apr-2023 327 Views

When using Python, container style can be a useful means of enhancing the readability and maintainability of code. You can style lists, tuples, dictionaries, sets, and even classes quickly and simply using this method. You can adjust how your data is presented by aligning columns, adding padding, and setting accuracy by using the built-in format() method. In this article, we'll take a deep dive into container formatting using format() in Python, including various types of containers and how to use them with the format() function. Container Formatting with format() Assuming we have a list of numbers that we want ...

Read More

Emulating Numeric Types in Python

Atharva Shah
Atharva Shah
Updated on 18-Apr-2023 780 Views

Python includes built-in mathematical data structures like complex numbers, floating-point numbers, and integers. But occasionally we might want to develop our own custom-behaved number classes. Here, the idea of imitating number classes is put into use. We can create objects that can be used in the same way as native numeric classes by simulating them. We will look at how to simulate numeric classes in Python in this article. Example 1: Emulating Addition class MyNumber: def __init__(self, x): self.x = x def __add__(self, other): ...

Read More
Showing 41–50 of 60 articles
Advertisements