
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
Vani Nalliappan has Published 130 Articles

Vani Nalliappan
81 Views
Assume, you have a dataframe, col1 col2 0 o e 1 e e 2 i u 3 e o 4 i i 5 u o 6 e a 7 u o 8 a u 9 e aThe result for matched ... Read More

Vani Nalliappan
378 Views
Assume, you have a dataframe0 1 20 10 20 30 1 40 50 60 2 70 80 90The result for replaced 1 by diagonal of a dataframe is −0 1 2 0 1 20 30 1 40 1 60 2 70 80 1SolutionTo solve this, we will follow the steps ... Read More

Vani Nalliappan
377 Views
Assume you have a dataframe, one two three 0 12 13 5 1 10 6 4 2 16 18 20 3 11 15 58The result for storing the minimum value in new row and column is −Add new column to store min value one two three min_value 0 12 ... Read More

Vani Nalliappan
567 Views
Assume you have a sqlite3 database with student records and the result for reading all the data is, Id Name 0 1 stud1 1 2 stud2 2 3 stud3 3 4 stud4 4 5 stud5SolutionTo solve this, we will follow the steps given below −Define a new connection. It ... Read More

Vani Nalliappan
142 Views
Assume you have a series and the result for Boolean operations, And operation is: 0 True 1 True 2 False dtype: bool Or operation is: 0 True 1 True 2 True dtype: bool Xor operation is: 0 False 1 False ... Read More

Vani Nalliappan
288 Views
Input −Assume you have a DataFrame, and the result for transpose of index and columns are, Transposed DataFrame is 0 1 0 1 4 1 2 5 2 3 6Solution 1Define a DataFrameSet nested list comprehension to iterate each element in the two-dimensional list data and store it in ... Read More

Vani Nalliappan
114 Views
Input −Assume you have a series and default float quantilevalue is 3.0SolutionTo solve this, we will follow the steps given below −Define a SeriesAssign quantile default value .5 to the series and calculate the result. It is defined below, data.quantile(.5) ExampleLet us see the complete implementation to get a better ... Read More

Vani Nalliappan
141 Views
Input −Assume, we have a DataFrame and group the records based on the designation is −Designation architect 1 programmer 2 scientist 2SolutionTo solve this, we will follow the below approaches.Define a DataFrameApply groupby method for Designation column and calculate the count as defined below, df.groupby(['Designation']).count()ExampleLet us see ... Read More

Vani Nalliappan
677 Views
Input −Assume, we have DataFrame with City and State columns and find the city, state name startswith ‘k’ and store into another CSV file as shown below −City, State Kochi, KeralaSolutionTo solve this, we will follow the steps given below.Define a DataFrameCheck the city starts with ‘k’ as defined below, ... Read More

Vani Nalliappan
427 Views
Input −Assume, sample DataFrame is, Id Name 0 1 Adam 1 2 Michael 2 3 David 3 4 Jack 4 5 PeterOutputput −Random row is Id 5 Name PeterSolutionTo solve this, we will follow the below approaches.Define a DataFrameCalculate the number of rows using df.shape[0] and assign to ... Read More