
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
AmitDiwan has Published 10744 Articles

AmitDiwan
479 Views
When it is required to increment the last element by 1 when a decimal value is given an input, a method named ‘increment_num’ is defined that checks to see if the last element in the list is less than 9. Depending on this, operations are performed on the elements of ... Read More

AmitDiwan
2K+ Views
To merge Pandas DataFrame, use the merge() function. The left outer join is implemented on both the DataFrames by setting under the “how” parameter of the merge() function i.e. −how = “left”At first, let us import the pandas library with an alias −import pandas as pd Let’s create two DataFrames ... Read More

AmitDiwan
733 Views
When it is required to check if a given variable is of power 3, a method named ‘check_power_of_3’ is defined that takes an integer as parameter. The modulus operator and the ‘//’ operator is used to check for the same and return True or False depending on the output.ExampleBelow is ... Read More

AmitDiwan
832 Views
When it is required to check if a given variable is of power 4, a method named ‘check_power_of_4’ is defined that takes an integer as parameter. The modulus operator and the ‘//’ operator is used to check for the same and return True or False depending on the output.ExampleBelow is ... Read More

AmitDiwan
369 Views
When it is required to check if two strings are isomorphic in nature, a method is defined that takes two strings as parameters. It iterates through the length of the string, and converts a character into an integer using the ‘ord’ method.ExampleBelow is a demonstration of the sameMAX_CHARS = 256 ... Read More

AmitDiwan
3K+ Views
To remove numbers from string, we can use replace() method and simply replace. Let us first import the require library −import pandas as pdCreate DataFrame with student records. The Id column is having string with numbers −dataFrame = pd.DataFrame( { "Id": ['S01', 'S02', 'S03', 'S04', 'S05', ... Read More

AmitDiwan
560 Views
When it is required to check if a number and its double exists in an array, it is iterated over, and multiple with 2 and checked.ExampleBelow is a demonstration of the samedef check_double_exists(my_list): for i in range(len(my_list)): for j in (my_list[:i]+my_list[i+1:]): ... Read More

AmitDiwan
2K+ Views
When it is required to find the prime numbers within a given range of numbers, the range is entered and it is iterated over. The ‘%’ modulus operator is used to find the prime numbers.ExampleBelow is a demonstration of the samelower_range = 670 upper_range = 699 print("The lower and upper ... Read More

AmitDiwan
542 Views
To display unique values in each column, use the unique() method and set the column within it. At first, import the required library −import pandas as pdCreate a DataFrame with two columns and duplicate records −dataFrame = pd.DataFrame( { "Student": ['Jack', 'Robin', 'Ted', 'Robin', 'Scarlett', 'Kat', ... Read More

AmitDiwan
381 Views
When it is required to find the third maximum in a list of integers, a method is defined that takes a list as a parameter. It initializes a list of floating point numbers to infinity. The values in the list are iterated over, and compared with infinite values. Depending on ... Read More