In [7]:
from functional import seq
import pandas as pd
In [3]:
!ls
In [28]:
# Data file this notebook works with
cat camping_purchases.csv
In [23]:
# Load the initial data using pandas, possibly do some work in pandas
df = pd.read_csv('camping_purchases.csv', header=None)
df
Out[23]:
In [24]:
# This shows PyFunctional using the dataframe correctly.
# PyFunctional also detects the notebook environment and that the data is table like
# so renders a nice HTML table representation.
seq(df)
Out[24]:
In [25]:
# Turning this into a list can see that the sequence is a list of rows.
# They are arrays since that is how pandas outputs lists of rows
seq(df).list()
Out[25]:
In [26]:
# Show representation using PyFunctional's csv parsing
seq.csv('camping_purchases.csv')
Out[26]:
In [27]:
# PyFunctional doesn't try to parse the columns, perhaps an area for improvement
seq.csv('camping_purchases.csv').list()
Out[27]:
In [ ]: