It has nothing to do with Python or NumPy specifically; that's a feature of ipython to run external programs, in this case, the head utility from the standard suite of *NIX command line utilities. head -4 just reads the first four lines of the file provided and echoes them to the terminal.

Answer from ShadowRanger on Stack Overflow
🌐
W3Schools
w3schools.com › python › pandas › ref_df_head.asp
Pandas DataFrame head() Method
A DataFrame with headers and the specified number of rows. ... If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail: sales@w3schools.com · If you want to report an error, or if you want to make a suggestion, send us an e-mail: help@w3schools.com · HTML Tutorial CSS Tutorial JavaScript Tutorial How To Tutorial SQL Tutorial Python ...
🌐
W3Schools
w3schools.com › python › ref_requests_head.asp
Python Requests head Method
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
🌐
W3Schools
w3schools.com › python › pandas › pandas_analyzing.asp
Pandas - Analyzing DataFrames
Pandas HOME Pandas Intro Pandas ... Wrong Format Cleaning Wrong Data Removing Duplicates ... One of the most used method for getting a quick overview of the DataFrame, is the head() method....
🌐
W3Schools
w3schools.com › python › showpython.asp
W3Schools online PYTHON editor
The W3Schools online code editor allows you to edit code and view the result in your browser
🌐
Initial Commit
initialcommit.com › blog › python-pandas-head
Python Head | Pandas DataFrame: head() Method
January 28, 2023 - If you're interested in learning more about the basics of Python, coding, and software development, check out our Coding Essentials Guidebook for Developers, where we cover the essential languages, concepts, and tools that you'll need to become a professional developer. Thanks and happy coding! We hope you enjoyed this article. If you have any questions or comments, feel free to reach out to jacob@initialcommit.io. Pandas Documentation Head - https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.head.html
🌐
GeeksforGeeks
geeksforgeeks.org › pandas › python-pandas-dataframe-series-head-method
Pandas Dataframe/Series.head() method - Python - GeeksforGeeks
July 26, 2025 - The head() method structure and contents of our dataset without printing everything. By default it returns the first five rows but this can be customized to return any number of rows.
🌐
Programiz
programiz.com › python-programming › pandas › methods › head
Pandas head()
import pandas as pd # create a sample DataFrame data = {'Values': [10, 20, 30, 40, 50, 60, 70]} df = pd.DataFrame(data) # use head() without any argument to get the default number of rows top_rows = df.head() print(top_rows) ... In this example, we used the head() method without any argument, so it returns the default number of rows, which is 5.
Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › python-pandas-dataframe-series-head-method
Python | Pandas Dataframe/Series.head() method - GeeksforGeeks
October 1, 2018 - # importing pandas module import pandas as pd # making data frame data = pd.read_csv("https://media.geeksforgeeks.org/wp-content/uploads/nba.csv") # number of rows to return n = 9 # creating series series = data["Name"] # returning top n rows top = series.head(n = n) # display top Output: As shown in the output image, top 9 rows ranging from 0 to 8th index position were returned. ... Pandas is an open-source software library designed for data manipulation and analysis. It provides data structures like series and DataFrames to easily clean, transform and analyze large datasets and integrates with other Python libraries, such as NumPy and Matplotlib.
🌐
Codecademy
codecademy.com › docs › python › requests module › .head()
Python | Requests Module | .head() | Codecademy
May 15, 2024 - The .head() method sends a request for data to a web server. The response object it returns contains the response headers (information about the web server’s content) without including the content itself.
🌐
w3resource
w3resource.com › pandas › dataframe › dataframe-head.php
Pandas DataFrame: head() function - w3resource
August 19, 2022 - The head() function is used to get the first n rows. This function returns the first n rows for the object based on position. It is useful for quickly testing if your object has the right type of data in it.
🌐
Cach3
w3schools.com.cach3.com › python › ref_requests_head.asp.html
Python Requests head Method - W3Schools
Python Overview Python Built-in Functions Python String Methods Python List Methods Python Dictionary Methods Python Tuple Methods Python Set Methods Python File Methods Python Keywords Python Exceptions Python Glossary · Random Module Requests Module Math Module cMath Module · Remove List Duplicates Reverse a String Add Two Numbers · Python Examples Python Exercises Python Quiz Python Certificate ... import requests x = requests.head('https://www.w3schools.com/python/demopage.php') print(x.headers) Run Example »
🌐
Analytics Vidhya
analyticsvidhya.com › home › head () and tail () functions explained with examples and codes
Head () and Tail () Functions Explained with Examples and Codes
June 11, 2025 - This article deeply delves into the head and tail functions, with illustrated code examples in Python, R, and other related programming languages, demonstrating their importance in diverse data analysis contexts.
🌐
W3Schools
w3schools.com › python › python_syntax.asp
Python Syntax
Python has commenting capability for the purpose of in-code documentation. Comments start with a #, and Python will render the rest of the line as a comment: ... If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail: sales@w3schools.com
🌐
Educative
educative.io › answers › what-are-head-and-tail-functions-in-pandas
What are head and tail functions in pandas?
It is widely used in data analysis and machine learning. The head function in Python displays the first five rows of the dataframe by default. It takes in a single parameter: the number of rows.
🌐
W3Schools
w3schools.com › bash › bash_head.php
Bash head Command - Display the beginning of a file
Extract the header information from a data file. ... If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail: sales@w3schools.com · If you want to report an error, or if you want to make a suggestion, send us an e-mail: help@w3schools.com · HTML Tutorial CSS Tutorial JavaScript Tutorial How To Tutorial SQL Tutorial Python ...
🌐
GeeksforGeeks
geeksforgeeks.org › python › head-method-python-requests
HEAD method - Python requests - GeeksforGeeks
December 9, 2021 - The HEAD method asks for a response identical to that of a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content.