Python __ilshift__() Magic Method

Syntax object.__ilshift__(self, other) The Python __ilshift__() magic method implements in-place bitwise left-shift operation x <<= y that calculates the left-shift operation x << y, and assigns the result to the first operands variable x. This operation is also called augmented arithmetic assignment. The method simply returns the new value to be assigned to the first … Read more

Reading and Writing JSON with Pandas

In this tutorial, we will learn how to transform a JSON object into a Pandas data frame and the other way around. For these approaches, we will have a look at the Pandas functions read_json() and to_json(). Working with JSON objects in Pandas is a very essential skill because we often find data stored in … Read more

Python __imatmul__() Magic Method

Syntax object.__imatmul__(self, other) The Python __imatmul__() magic method implements in-place matrix multiplication x @= y that calculates the matrix multiplication of the two operands and assigns the result to the left operand. This operation is also called augmented arithmetic assignment. The method simply returns the new value to be assigned to the first operand. When … Read more

Python Black-Scholes Model and the Basics of Option Pricing

?Β Part I: Risk-neutral valuation, Monte Carlo integration vs. the Black-Scholes formula You can find the code in the GitHub repository for this article. The Black-Scholes (BS) pricing model is still a de facto standard method of pricing financial options. Even though there has been much research into improved and possibly more realistic models, the fact … Read more

What is “payable” in Solidity?

In Solidity, we can use the keyword payable to specify that an address or a function can receive Ether. This article shows you how it works and how we can use it. Ethereum Accounts and Transactions Each Ethereum account, either an external account (human) or a contract account, has a balance that shows how much … Read more

Python __imul__() Magic Method

Syntax object.__imul__(self, other) The Python __imul__() magic method implements in-place multiplication x *= y that multiplies the operands with each other and assigns the result to the left operand. This operation is also called augmented arithmetic assignment. The method simply returns the new value to be assigned to the first operand. When you call x … Read more

Python __isub__() Magic Method

Syntax object.__isub__(self, other) The Python __isub__() magic method implements in-place subtraction x -= y that subtracts the operands from each other and assigns the result to the left operand. This operation is also called augmented arithmetic assignment. The method simply returns the new value to be assigned to the first operand. When you call x … Read more

Python __iadd__() Magic Method

Syntax object.__iadd__(self, other) The Python __iadd__() magic method implements in-place addition x += y that adds together the operands and assigns the result to the left operand. This operation is also called augmented arithmetic assignment. The method simply returns the new value to be assigned to the first operand. When you call x += y, … Read more

Python Excel – Styling Your Worksheets

Part 6 in Working with Excel focuses on styling. Impress your customers by styling the Worksheet to match their brand by: adding in their unique logo, using their color scheme, using their preferred font style, formatting the Worksheet using their preferred report style. Taking the time to do this makes you stand above the crowd. … Read more