- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Pradeep Elance has Published 445 Articles
![Pradeep Elance](https://www.tutorialspoint.com/assets/profiles/121076/profile/60_44312-1565945237.jpg)
Pradeep Elance
877 Views
Pandas Data Frame is a two-dimensional data structure, i.e., data is aligned in a tabular fashion in rows and columns. It can be created using python dict, list, and series etc. In this article, we will see how to add a new column to an existing data frame.So first let's ... Read More
![Pradeep Elance](https://www.tutorialspoint.com/assets/profiles/121076/profile/60_44312-1565945237.jpg)
Pradeep Elance
2K+ Views
Unlike other programming languages, python is not designed to start execution of the code from a main function explicitly. A special variable called __name__ provides the functionality of the main function. As it is an in-built variable in python language, we can write a program just to see the value ... Read More
![Pradeep Elance](https://www.tutorialspoint.com/assets/profiles/121076/profile/60_44312-1565945237.jpg)
Pradeep Elance
513 Views
Ordering of data elements in a specific order is a frequently needed operation. To sort elements in an array, python uses the functions named sorted() and array.sort().sorted(array)This function returns a sorted array without modifying the original array.a = [9, 5, 3, 1, 12, 6] b = sorted([9, 5, 3, 1, ... Read More
![Pradeep Elance](https://www.tutorialspoint.com/assets/profiles/121076/profile/60_44312-1565945237.jpg)
Pradeep Elance
5K+ Views
Heap queue is a special tree structure in which each parent node is less than or equal to its child node. In python it is implemented using the heapq module. It is very useful is implementing priority queues where the queue item with higher weight is given more priority in ... Read More
![Pradeep Elance](https://www.tutorialspoint.com/assets/profiles/121076/profile/60_44312-1565945237.jpg)
Pradeep Elance
459 Views
Two lists are given. We need to find the index of the elements from the first list whose values match with the elements in the second list.With indexWe simply design follow to get the value of the element in the second list and extract the corresponding index from the first ... Read More
![Pradeep Elance](https://www.tutorialspoint.com/assets/profiles/121076/profile/60_44312-1565945237.jpg)
Pradeep Elance
962 Views
Given a Python list we want to find out only e e the last few elements.With slicingThe number of positions to be extracted is given. Based on that we design is slicing technique to slice elements from the end of the list by using a negative sign.Example Live DemolistA = ['Mon', ... Read More
![Pradeep Elance](https://www.tutorialspoint.com/assets/profiles/121076/profile/60_44312-1565945237.jpg)
Pradeep Elance
637 Views
A Python dictionary contains key value pairs. In this article we will see how to get the key of the element whose value is maximum in the given Python dictionary.With max and getWe use the get function and the max function to get the key.Example Live DemodictA = {"Mon": 3, "Tue": ... Read More
![Pradeep Elance](https://www.tutorialspoint.com/assets/profiles/121076/profile/60_44312-1565945237.jpg)
Pradeep Elance
3K+ Views
Python dictionary contains key value pairs. In this article we aim to get the value of the key when we know the value of the element. Ideally the values extracted from the key but here we are doing the reverse.With index and valuesWe use the index and values functions of ... Read More
![Pradeep Elance](https://www.tutorialspoint.com/assets/profiles/121076/profile/60_44312-1565945237.jpg)
Pradeep Elance
590 Views
When a Python list contains values like true or false and 0 or 1 it is called binary list. In this article we will take a binary list and find out the index of the positions where the list element is true.With enumerateThe enumerate function extracts all the elements form ... Read More
![Pradeep Elance](https://www.tutorialspoint.com/assets/profiles/121076/profile/60_44312-1565945237.jpg)
Pradeep Elance
267 Views
We have a tuple of strings. We are required to create a list of elements which are the first character of these strings in the tuple.With indexWe design a for loop to take each element and extract the first character by applying the index condition as 0. Then the list ... Read More