Using python to extract out data from excel csv file [closed]

A good recommendation I can make for reading/manipulating csv data is pandas. For example reading data using pandas is as simple as:

import pandas as pd
df = pd.read_csv( "my/path/to/database1.csv" )

The result is a dataframe. A tabular representation of your data which can be manipulated in any number of ways. Writing to a csv is also another one liner. You can use the following:

df.to_csv( "my/path/to/output.csv" )

There are other methods available for working with excel data, such as pd.read_excel and df.to_excel. More available here. Hope this helps.

Leave a Comment