From 539cc37d642c469db7f725842045ea7fbb156032 Mon Sep 17 00:00:00 2001 From: Thomas Belahi Date: Mon, 13 Jun 2016 15:41:50 +0200 Subject: [PATCH] initialize pandas section --- sheet.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sheet.md b/sheet.md index 8c6e500..c16d7bd 100644 --- a/sheet.md +++ b/sheet.md @@ -431,3 +431,13 @@ pts_new = map_coordinates(data, float_indices, # array at index coordinate from scipy.integrate import quad value = quad(func, low_lim, up_lim) # definite integral of python function ``` + +## Pandas + + ```python +import pandas as pd # import pandas +df = pd.read_csv("filename.csv") # read and load CSV file in a DataFrame +print(df[:2]) # print first 2 lines of the DataFrame +raw = df.values # get raw data out of DataFrame object +cols = df.columns # get list of columns headers +```