dframe DocumentationΒΆ
dframe is a Python implementation of indexless dataframe data structure. dframe was built to favor ease-of-use over computational speed. It’s specifically aimed to be simple and unambiguous for interactive use.
dframe provides DataFrame
that is more similar to R’s inbuilt dataframes
(without the ambiguity) than Python’s pandas.
Some notable differences from pandas dataframes and R dataframes are:
- No index/No rownames. dframe provides indexless dataframes. There is no index and no rownames. Rows can only be indexed by row numbers (
int
) and by logicals (coming soon). This means there is no ambiguity whether row “index” or row “number” is used. There is no.iloc
or.loc
; use familiar, regular indexing, for example,df[0:3, 2]
. - String column names only. Dataframes in dframe can only have have column names that are string type (
str
,unicode
). You can never have a column named with anint
such as1
. - No duplicate column names. Dataframes in dframe cannot have duplicate column names. This means there can only be one column named
colname
anddf['colname']
will always return exactly one column without any ambiguity. - Simple stacking operations. Since there is no index, there is no ambiguity when performing simple matrix-like horizontal and vertical stacking operations. You will not have to reindex dataframes to horizontal stack them. No index cleanup required after a stacking operation. Database-style merge operations are completely separate from matrix-like stacking operations – use whichever one suits the task at hand. No need to cast matrix-like stacking operations into database-style merge operations.
- Almost first-class missing value support. dframe handles missing data using Python’s in-built
None
instead of defining a new missing value type. You can have missing values in anydtype
, not just infloat
. Marking one element of a column as missing value will not change thedtype
of that column. - No Series vs DataFrame. There is no object like
Series
in pandas. In dframe,df['colname']
returns alist
-likeArray
object.Array
is sub-classed fromlist
and behaves like alist
is most ways. If you would rather have a dataframe with only one column, usedf[['colname']]
.