通用数据结构vs DataFram

2024-09-25 06:24:52 发布

您现在位置:Python中文网/ 问答频道 /正文

据我所知,最常见的数据结构是:

Arrays
Stacks
Queues
Linked lists
Trees
Hash Tables
Heaps
Graph Data structures

数据帧呢?DataFrame是一个单独的数据结构还是上面列出的一些结构的变种?在


Tags: 数据数据结构dataframetablesdatahashtreeslists
2条回答

DataFrame是pandaspython数据分析库的一部分,与电子表格或SQL表相当。它不是本机Python类型,但DataFrame可以包含不同类型的列。见Pandas Dataframe docs

Pandas DataFrame docs

DataFrame is a 2-dimensional labeled data structure with columns of potentially different types. You can think of it like a spreadsheet or SQL table, or a dict of Series objects.

它基本上是一系列对象的dict。现在什么是序列对象?在

Series is a one-dimensional labeled array capable of holding any data type (integers, strings, floating point numbers, Python objects, etc.). The axis labels are collectively referred to as the index.

这些数组被标记为

相关问题 更多 >