What is head and tail method for data frames in pandas ?



What is head and tail method for data frames in pandas ?..

Answer / Ashwani Kumar Joshi

The head() function returns the first n rows of a DataFrame (default is 5), while the tail() function returns the last n rows (again, default is 5). Both functions are useful for quickly inspecting the contents of large datasets.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

Given a text file (FILE1) with lots of words (ex, an ebook), and another file (FILE2) with a list of blacklist words (slangs, porn, etc.), write a program to find the top 100 words(most frequent 100 words) from FILE1 which are not present in FILE2.

1 Answers  


What is the difference between a function and a method python?

1 Answers  


Is python is a case sensitive?

1 Answers  


What is self in python?

1 Answers  


What are the differences between c and python?

1 Answers  


Can I use python to make a website?

1 Answers  


How is inheritance and overriding methods are related in python?

1 Answers  


What is Python Decorator?

1 Answers  


Write a program to find out the name of an object in python.

1 Answers  


What are the principal differences between the lambda and def?

1 Answers  


What is py checker in python?

1 Answers  


How do we execute python?

1 Answers  


Categories