AmitDiwan has Published 10744 Articles

Python Pandas - How to delete a row from a DataFrame

AmitDiwan

AmitDiwan

Updated on 23-Aug-2023 21:13:18

63K+ Views

To delete a row from a DataFrame, use the drop() method and set the index label as the parameter.At first, let us create a DataFrame. We have index label as w, x, y, and z:dataFrame = pd.DataFrame([[10, 15], [20, 25], [30, 35], [40, 45]], index=['w', 'x', 'y', 'z'], columns=['a', 'b'])Now, ... Read More

Python program to check if a number is Prime or not

AmitDiwan

AmitDiwan

Updated on 22-Aug-2023 00:23:58

215K+ Views

A prime number is a natural number greater than 1 that is not a product of two smaller natural numbers. Any whole number which is greater than 1 and has only two factors that is 1 and the number itself, is called a prime number Let’s say the following is ... Read More

Default exports vs Named exports in JavaScript

AmitDiwan

AmitDiwan

Updated on 16-Aug-2023 16:35:06

957 Views

In this article, we will learn the difference between default exports and named exports in javascript, and how we can use them to effectively organize our code structure. In javascript, we can use default exports and named exports so as to have separate files or modules for separate pieces of ... Read More

What are Promises in JavaScript?

AmitDiwan

AmitDiwan

Updated on 16-Aug-2023 16:04:39

875 Views

Promises, in JavaScript, can be used to simplify asynchronous programming, making it easier to handle asynchronous operations like I/O operations or communicate with an external system or machine. Promises are objects that represent the eventual completion or failure of an asynchronous operation and its resulting value. They provide an easy ... Read More

How to use named arguments in JavaScript functions?

AmitDiwan

AmitDiwan

Updated on 16-Aug-2023 15:58:15

2K+ Views

In this article, we will learn how to use named arguments in javascript, and how we can use it to significantly enhance code readability and maintainability. Javascript allows us to use named arguments, which eliminate the need for the order of parameters to matter during function execution. We may ... Read More

Exports & Imports in JavaScript

AmitDiwan

AmitDiwan

Updated on 16-Aug-2023 15:55:32

358 Views

We will learn how to utilise imports and exports in javascript in this post, as well as how to use them to break our code into different modules in order to better organise it. To facilitate modular development in programming, which enables us to organise our code into reusable modules, ... Read More

Various ways to define a variable in JavaScript

AmitDiwan

AmitDiwan

Updated on 16-Aug-2023 15:42:52

830 Views

In this article, we will learn about the various ways to define and declare variables in javascript, and how we can use them to implement state management in our applications. In javascript, variables can be thought of as containers that hold values, and which can be retrieved later on in ... Read More

How to read a cookie using JavaScript?

AmitDiwan

AmitDiwan

Updated on 16-Aug-2023 15:40:37

5K+ Views

In this article, we will learn how to read cookies in javascript, and how we can use it to implement certain features such as user tracking, user preference, personalized experience, etc. Cookies are small pieces of data stored in a user's web browser. In javascript, we can read cookies using ... Read More

Function returning another function in JavaScript

AmitDiwan

AmitDiwan

Updated on 16-Aug-2023 15:37:40

674 Views

In JavaScript, functions can be assigned to any variables, they can be passed as arguments to other functions, and can even be returned from other functions. This behavior of functions allow us create HOCs in javascript, which are functions that return other functions. These higher−order functions can be used in ... Read More

How to convert Array to Set in JavaScript?

AmitDiwan

AmitDiwan

Updated on 16-Aug-2023 15:33:12

730 Views

This tutorial will teach you how to eliminate duplicate values from an array of items in Javascript by converting an array to a set. When storing distinct values from a collection of data in javascript, we can utilise the Set data structure to get rid of duplicate values. When we ... Read More

Advertisements