Python Pandas - pandas.api.types.is_file_like() Function Last Updated : 28 Mar, 2022 Comments Improve Suggest changes Like Article Like Report In this article, we will be looking toward the functionality of pandas.api.types.is_file_like() from the pandas.api.types module with its various examples in the Python language. An object must be an iterator AND have a read or write method as an attribute to be called file-like. It is important to note that file-like objects must be iterable, but iterable objects do not have to be file-like. Pandas.api.types.is_file_like() method is used to check if the object is a file-like object. Syntax: pandas.api.types.is_file_like(obj) Parameters: obj: the object we pass in to check. Returns: boolean value. True if object has file like properties, false if it doesn't. Example 1: Under this article, the pandas.api.types package and the NumPy package is imported and a NumPy array is checked if it's a file-like object. As array object is not file like pandas.api.types.is_file_like() returns False . Python3 # import packages from pandas.api.types import is_file_like import numpy as np # checking if it's a file like object print(is_file_like(np.array([4, 8, 2, 7]))) Output: False Example 2: In this example, the StringIO is used which is an in-memory file-like object that performs newline changes. Since it is a file type object pandas.api.types.is_file_like() method returns True when checked. Python3 # import packages import io from pandas.api.types import is_file_like buffer = io.StringIO("geeksforgeeks") # checking if it's a file like object print(is_file_like(buffer)) Output: True Example 3: under this example, a text file named "file1.txt" is checked if it's a file-like object through the pandas.api.types.is_file_like() method returns True when the file object is checked if its file object type. Click here to view the used file-file1.txt. Python3 # import packages import pandas as pd # opening a file data = open('file1.txt') # checking if it's a file like object print(pd.api.types.is_file_like(data)) Output: True Comment More infoAdvertise with us Next Article Python Pandas - pandas.api.types.is_file_like() Function L lizzywizzy366 Follow Improve Article Tags : Python Geeks Premier League Geeks-Premier-League-2022 Python-pandas Python pandas-methods Practice Tags : python Similar Reads Python pandas.api.types.is_dict_like() Function In this article, we will be looking at the insight of the is_dict_like() function from the pandas.api.types package with various examples in a python programming language. is_dict_like is a method that helps to specify whether the given object for the is_dict_like method is a dictionary or not. Syn 2 min read pandas.isna() function in Python This method is used to detect missing values for an array-like object. This function takes a scalar or array-like object and indicates whether values are missing (``NaN`` in numeric arrays, ``None`` or ``NaN`` in object arrays, ``NaT`` in datetimelike). Syntax : pandas.isna(obj) Argument : obj : sca 1 min read numpy.find_common_type() function - Python numpy.find_common_type() function determine common type following standard coercion rules. Syntax : numpy.find_common_type(array_types, scalar_types) Parameters : array_types : [sequence] A list of dtypes or dtype convertible objects representing arrays. scalar_types : [sequence] A list of dtypes or 1 min read type and isinstance in Python In this article, we will cover about type() and isinstance() function in Python, and what are the differences between type() and isinstance(). What is type in Python? Python has a built-in method called type which generally comes in handy while figuring out the type of the variable used in the progr 5 min read numpy.dtype.kind() function â Python numpy.dtype.kind() function determine the character code by identifying the general kind of data. Syntax : numpy.dtype.kind(type) Parameters : type : [dtype] The input data-type. Return : Return the character code by identifying the general kind of data. Code #1 : Python3 # Python program explaining 1 min read Python | Pandas Index.contains() Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas Index.contains() function return a boolean indicating whether the provided key 2 min read Python | Pandas Index.identical() Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas Index.identical() function determine if two Index objects contains the same ele 2 min read How to read multiple data files into Pandas? In this article, we are going to see how to read multiple data files into pandas, data files are of multiple types, here are a few ways to read multiple files by using the pandas package in python. The demonstrative files can be download from here Method 1: Reading CSV files If our data files are in 3 min read Get the data type of column in Pandas - Python Letâs see how to get data types of columns in the pandas dataframe. First, Letâs create a pandas dataframe. Example: Python3 # importing pandas library import pandas as pd # List of Tuples employees = [ ('Stuti', 28, 'Varanasi', 20000), ('Saumya', 32, 'Delhi', 25000), ('Aaditya', 25, 'Mumbai', 40000 3 min read Python | Pandas DataFrame.isin() In this article, we will explore the Pandas DataFrame.isin() method provided by the Pandas library in Python. Python is widely recognized for its proficiency in data analysis, largely attributed to its exceptional ecosystem of data-centric packages. Among these, Pandas stands out as an essential too 2 min read Like