For a pandas data frame df, what function is used to return the first five rows? code example
Example 1: what is the type of the data python
>>> type(1234)
<class 'int'>
>>> type(55.50)
<class 'float'>
>>> type(6+4j)
<class 'complex'>
>>> type("hello")
<class 'str'>
>>> type([1,2,3,4])
<class 'list'>
>>> type((1,2,3,4))
<class 'tuple'>
>>> type({1:"one", 2:"two", 3:"three"}
<class 'dict'>
Example 2: python - head
df.head(10)
df.tail(10)
Example 3: what is the function prototype for fputc()
int fputc(const char ch, FILE *filename);