TenFrame introduction#

TenFrame is 1010data’s pandas-like solution for querying 1010data tables.

TenFrame is a Python package built on top of the 1010data Python SDK (py1010).

If you are a developer already familiar with the Python pandas library, TenFrame offers a similar framework for querying large 1010data tables. Pandas is a popular framework for data analysis, but it can only handle a finite amount of data at once. 1010data, on the other hand, is able to perform queries on very large datasets (millions or even billions of rows) and extract meaning from that data. TenFrame allows you to use tools similar to the ones you are familiar with to harness the power of 1010data.

The main objects in TenFrame are the TenFrame object and the TenSeries object. The TenFrame object is two dimensions (columns and rows), while the TenSeries object is one dimension. They mimic their pandas counterparts as much as possible, but behind the scenes they take advantage of 1010data’s powerful query language.

The TenFrame object#

The TenFrame object in TenFrame is the equivalent of the DataFrame object in pandas, but the TenFrame only pretends to be a DataFrame. In reality, the TenFrame class is a wrapper around a 1010data query. This way, you do not need to know the 1010data query language in order to perform analysis on very large tables.

TenFrame does not attempt to perform a query until you actually try to access some computed data.

For example, the following TenFrame code does not perform the computation of col1*col2:

frame['new'] = frame.col1 * frame.col2

This code tells the server that there is to be a column named 'new' that is a computed column of col1 * col2. The server computes the column only when the user needs to access the data. To access the data, TenFrame uses a py1010 Query object to send requests over to the 1010data server, but only when needed. Py1010 performs other transactions with the 1010data servers, including logging in and out. For these reasons, some familiarity with py1010 is helpful.

For more information about py1010 transactions, see the 1010data Python SDK User’s Guide. It is not necessary to know the 1010data query language to use TenFrame, but it can be useful. If you would like a deeper understanding of the 1010data query language (Macro Language), refer to the 1010data Reference Manual.

The TenSeries object#

Unlike a Series panda object, the TenSeries object doesn’t contain any data on its own. The TenSeries is not much more than a column name and a reference to a TenFrame. The TenSeries must always be associated with a TenFrame. You usually get a TenSeries by subsetting a TenFrame.

Contents#