- 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
Vani Nalliappan has Published 130 Articles
Vani Nalliappan
494 Views
Input −Assume, sample DataFrame is, Id Name 0 1 Adam 1 2 Michael 2 3 David 3 4 Jack 4 5 PeterOutput −After, sorting the elements in descending order as, Id Name 4 5 Peter 1 2 Michael 3 4 Jack 2 3 David 0 1 AdamSolutionTo solve ... Read More
Vani Nalliappan
419 Views
Input −Assume, sample DataFrame is, Id Age salary 0 1 27 40000 1 2 22 25000 2 3 25 40000 3 4 23 35000 4 5 24 30000 5 6 32 30000 6 7 30 50000 7 8 28 20000 8 9 ... Read More
Vani Nalliappan
792 Views
Input −Assume, you have a DataFrame, Id Age 0 1 21 1 2 23 2 3 32 3 4 35 4 5 18Output −Total number of age between 20 to 30 is 2.SolutionTo solve this, we will follow the below approaches.Define a DataFrameSet the DataFrame Age column between 20, 30. ... Read More
Vani Nalliappan
480 Views
Input −Assume, you have DataFrame, Id Name Grade 0 1 stud1 A 1 2 stud2 B 2 3 stud3 C 3 4 stud4 A 4 5 stud5 AOutput −And the result for ‘A’ grade students name, 0 stud1 3 stud4 4 stud5SolutionTo ... Read More
Vani Nalliappan
745 Views
Input −Assume, you have a DataFrameDataFrame is Id Age Salary 0 1 27 40000 1 2 22 25000 2 3 25 40000 3 4 23 35000 4 5 24 30000 5 6 32 30000 6 7 ... Read More
Vani Nalliappan
467 Views
Input −Assume, we have a Series like this, [“one”, “two”, “eleven”, “pomegranates”, “three”] and the maximum length of the string is “Pomegranates”SolutionTo solve this, we will follow the below approaches.Define a SeriesSet the initial value of a maxlen is 0Set the “maxstr” value is initially empty string.Create a for loop ... Read More
Vani Nalliappan
80 Views
Input −Assume, you have a Series, 0 11 1 12 2 66 3 24 4 80 5 40 6 28 7 50Output −Maximum value for first four row is 66.SolutionTo solve this, we will follow the steps given below −Define a SeriesSet ... Read More
Vani Nalliappan
55 Views
Input −Assume, you have a Series, 0 1.3 1 2.6 2 3.9 3 4.8 4 5.6Output −0 1.0 1 3.0 2 4.0 3 5.0 4 6.0Solution 1Define a SeriesCreate an empty list. Set the for loop to iter the data. ... Read More
Vani Nalliappan
262 Views
Input −Assume, you have date series to find the number of days in a month.SolutionTo solve this, we will follow the steps given below −Define date seriesSet date_range value as 2020-02-10.find the number of days in a month using Series.dt.daysinmonthExampleLet us see the complete implementation to get a better understanding ... Read More
Vani Nalliappan
215 Views
Input −Assume, you have a series and find the day of the year from a given specific range of dates.SolutionTo solve this, we will follow the below approaches.Define a SeriesSet date_range as ‘2020-01-10’ with five periods. It is defined below, pd.date_range('2020-01-10', periods=5)Find the day using Series.dt.dayofyear.ExampleLet us see the complete ... Read More
To Continue Learning Please Login
Login with Google