In r, with the str() function you can see structure from an object like this:
> str(mari)
'data.frame':   25834 obs. of  6 variables:
 $ Xcoor: num  0.0457 0.0469 0.0481 0.0495 0.0519 ...
 $ Ycoor: num  0.107 0.107 0.107 0.108 0.108 ...
 $ Zcoor: num  -0.701 -0.701 -0.701 -0.703 -0.703 ...
 $ RC   : int  120 124 124 125 124 122 120 120 120 120 ...
 $ GC   : int  121 117 117 117 118 119 120 120 120 120 ...
 $ BC   : int  127 135 144 135 126 127 125 125 124 137 ...
Is there a similar function like this one?
In r, with the str() function you can see structure from an object like this: > str(mari) 'data. frame': 25834 obs. of 6 variables: $ Xcoor: num 0.0457 0.0469 0.0481 0.0495 0.0519 ...
Get the Structure of the Data Frame The structure of the data frame can be seen by using str() function.
I realize this is an old question, but wanted to provide clarification for anyone else that comes across this question in the future like I did.
As MaxNoe said, pandas is what is needed and the pandas.DataFrame.info method is the equivalent to the str() function in R.
Using the same example as MaxNoe:
>>> import pandas as pd
>>> data = pd.DataFrame({
    'a': [1, 2, 3, 4, 5],
    'b': [1, 2, 3, 4, 5]
})
>>> data.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 5 entries, 0 to 4
Data columns (total 2 columns):
a    5 non-null int64
b    5 non-null int64
dtypes: int64(2)
memory usage: 160.0 bytes
The documentation can be found here https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.info.html.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With