News for hackers. Stuff that matters.
Re:Show HN: Hamilton, a Microframework for Creating Dataframes by akavel on Tuesday November 09, 2021 @03:25AM (#29159084)
Could someone please help me understand what a "dataframe" is? I see this term thrown around occasionally, but failed to find a definition/explanation for someone who doesn't actually already know what it is :(
Re:Show HN: Hamilton, a Microframework for Creating Dataframes by omnicognate on Tuesday November 09, 2021 @04:33AM (#29159484)
In this context it's a specific class, DataFrame, in the pandas library: https://pandas.pydata.org/pandas-docs/stable/reference/api/p...

> Two-dimensional, size-mutable, potentially heterogeneous tabular data.

> Data structure also contains labeled axes (rows and columns). Arithmetic operations align on both row and column labels. Can be thought of as a dict-like container for Series objects. The primary pandas data structure.

Re:Show HN: Hamilton, a Microframework for Creating Dataframes by teej on Tuesday November 09, 2021 @03:38AM (#29159145)
It’s a special data structure that holds a 2 dimensional array and allows you to perform very efficient “vector” (all rows/all columns) operations on it.

It’s used a lot in data science applications, particularly for matrix math.

Re:Show HN: Hamilton, a Microframework for Creating Dataframes by jstx1 on Tuesday November 09, 2021 @07:08AM (#29160570)
It's a table. Think of a table from a database or a 2-dimensional csv file that exists as an object in your programming language of choice. The exact implementation is different in different languages and libraries. In Python the most popular one is the DataFrame class from the pandas library, R has data.frame built in, Julia has DataFrames.jl and there are other implementations too - spark, dask, data.table, tibble etc.

The easiest way for this is to click is open up Python or R and play around with a dataframe, it really isn't that complicated.

Re:Show HN: Hamilton, a Microframework for Creating Dataframes by armanboyaci on Tuesday November 09, 2021 @03:31AM (#29159104)
This article might help: "Is a Dataframe Just a Table?" https://drops.dagstuhl.de/opus/volltexte/2020/11960/pdf/OASI...
Re:Show HN: Hamilton, a Microframework for Creating Dataframes by Zababa on Tuesday November 09, 2021 @06:41AM (#29160351)
A dataframe is usually a list of columns. Columns are usually typed arrays that have a name. It's a bit like a struct of arrays (https://en.wikipedia.org/wiki/AoS_and_SoA) except that you can usually easily transform the dataframe (add columns, split columns, stuff like that).
Re:Show HN: Hamilton, a Microframework for Creating Dataframes by enriquto on Tuesday November 09, 2021 @03:45AM (#29159191)
I hate dataframes, but the definition is just a 2d array of numbers with names on the rows and columns.
Re:Show HN: Hamilton, a Microframework for Creating Dataframes by jstx1 on Tuesday November 09, 2021 @07:03AM (#29160519)
They don't have to be numbers, you can have any data type but the type is always consistent along each column.
Re:Show HN: Hamilton, a Microframework for Creating Dataframes by heresie-dabord on Tuesday November 09, 2021 @07:47AM (#29161024)