A DataFrame is essentially a container for a dataset. It keeps track of all of the different columns and lets you do actions on them like swapping rows and columns.
At the top of the DataFrames category is a section for uploaded datasets. This holds all of the blocks you can use to access your uploaded datasets. To learn more about uploading datasets, see our page on dataset uploads.
This block is used to get a column from a DataFrame as a list (also called an array). This lets you use the column in other blocks, like machine learning models or plots.
This block is used to create an empty DataFrame. Right now this is not very useful, we may add a use for it in the future.
This block is used to create a DataFrame with predefined data. You can specify headers as a list of strings, where each string is one column name, and the data is a 2D array (a matrix).
A matrix block has a size limit of 10 by 10. If your dataset is larger than this, you should probably use the dataset uploads feature.
This is the block used in the "Uploaded datasets" section, and can be used if you want to include a block accessing a dataset that you haven't uploaded yet (you'll still need to upload it before running the program, though).
Transposing a DataFrame swaps the columns and rows of a dataset, so this:
| Column 1 | Column 2 | Column 3 || |----------|:----------|:----------:|:| | 1 | 2 | 3 | 4 | | 5 | 6 | 8 | 3 | | 9 | 5 | 0 | 2 |
| Column 1 | Column 2 | Column 3 | |----------|:----------|:----------:| | 1 | 5 | 9 | | 2 | 6 | 5 | | 3 | 8 | 0 | | 4 | 3 | 2 |
This returns a 2D array (a matrix) with the columns specified. Each list in the matrix represents a column; if you want the result to be a list of rows, then transpose the DataFrame first.