If you’re planning to learn data analysis, machine learning, or data science tools in python, you’re most likely going to be using the wonderful pandas library. Pandas is an open source library for data manipulation and analysis in python.
One of the easiest ways to think about that, is that you can load tables (and excel files) and then slice and dice them in multiple ways:
Pandas allows us to load a spreadsheet and manipulate it programmatically in python. The central concept in pandas is the type of object called a DataFrame – basically a table of values which has a label for each row and column. Let’s load this basic CSV file containing data from a music streaming service:
df = pandas.read_csv(‘music.csv’)
Now the variable df is a pandas DataFrame:
We can select any column using its label:
We can select one or multiple rows using their numbers (inclusive of both bounding row numbers):
Original URL: http://feedproxy.google.com/~r/feedsapi/BwPx/~3/uKBDUDHMh5k/