Pandas: what is an NDFrame object (and what is a non-NDFrame object)

I try to execute two DataFrames and get an error 'TypeError: cannot concatenate a non-NDFrame object'. I look around, there are many people who get this error, most of the time when they try to do something other than what their code really does (so the answers answer their specific, but unrelated questions)

My question is not to solve my specific problem, but to understand the error ... What is an object other than NDFrame? Why can't it be concatenated?

Also, why does this apply to NDFrames (What is it and where do I use them?) Are there all NDFrames in DataFrames? Are there any NDFrames that are not DataFrames?) ...

I would understand if he said 'TypeError: cannot concatenate a non-DataFrame object'(although I'm not sure that they were not the DataFrames cause of my error) These are basically my curiosity quests, I am not trying to find any error ...

+6
source share
1 answer

From the mouth of a horse:

N-dimensional analogue of DataFrame. Store multidimensional in a resizable, labeled data structure

Then what is a DataFrame?

class DataFrame (NDFrame): Two-dimensional resizable, potentially heterogeneous tabular data structure with marked axes (rows and columns). Arithmetic operations align on the labels of rows and columns. You can think of it as a dictate-like container for series objects.

, DataFrame (.. ) NDFrame. Pandas DataFrame , NDFrame . , Pandas 1D, DataFrame 2D, , Pandas 'name Panel, Pandas , .

Pandas / 4D , ( , - , !). , , xarray. , , , 2D.

+9

Source: https://habr.com/ru/post/1015961/


All Articles