Python | Pandas Series.from_csv() Last Updated : 13 Feb, 2019 Comments Improve Suggest changes Like Article Like Report Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based indexing and provides a host of methods for performing operations involving the index. Pandas Series.from_csv() function is used to read a csv file into a series. It is preferable to use the more powerful pandas.read_csv() for most general purposes. Syntax: Series.from_csv(path, sep=', ', parse_dates=True, header=None, index_col=0, encoding=None, infer_datetime_format=False) Parameter : path : string file path or file handle / StringIO sep : Field delimiter parse_dates : Parse dates. Different default from read_table header : Row to use as header (skip prior rows) index_col : Column to use for index encoding : a string representing the encoding to use if the contents are non-ascii infer_datetime_format : If True and parse_dates is True for a column, try to infer the datetime format based on the first datetime string Returns : Series For this example we have used a CSV file. To download click here Example #1: Use Series.from_csv() function to read the data from the given CSV file into a pandas series. Python3 # importing pandas as pd import pandas as pd # Read the data into a series sr = pd.Series.from_csv('nba.csv') # Print the first 10 rows of series print(sr.head(10)) Output : As we can see in the output, the Series.from_csv() function has successfully read the csv file into a pandas series. Example #2 : Use Series.from_csv() function to read the data from the given CSV file into a pandas series. Use the 1st column as an index of the series object. Python3 # importing pandas as pd import pandas as pd # Read the data into a series sr = pd.Series.from_csv('nba.csv', index_col = 1) # Print the first 10 rows of series print(sr.head(10)) Output : As we can see in the output, the Series.from_csv() function has successfully read the csv file into a pandas series. Comment More infoAdvertise with us Next Article Python | Pandas Series.from_csv() S Shubham__Ranjan Follow Improve Article Tags : Python Pandas Python-pandas Python pandas-series-methods AI-ML-DS With Python +1 More Practice Tags : python Similar Reads Python | Pandas Series.from_array() Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based indexing and provides a host of methods for performing operations involving the index. Pandas Series.from_array() function constru 2 min read Python | Pandas Series.to_csv() Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based indexing and provides a host of methods for performing operations involving the index. Pandas Series.to_csv() function write the g 3 min read Python | Pandas Series.to_frame() Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based indexing and provides a host of methods for performing operations involving the index. Pandas Series.to_frame() function is used t 3 min read Python | Pandas Series.div() 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. Python Series.div() is used to divide series or list like objects with same length by 2 min read Python | Pandas Series.mul() 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. Python Series.mul() is used to multiply series or list like objects with same length w 3 min read Like