Issue
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?
Solution
If you are looking for an equivalent of R
s data.frame
, you will want to look into pandas
.
The pandas.DataFrame
might be what you are looking for.
The get an idea of what is in a DataFrame
you could use the .describe
or .head
methods.
import pandas as pd
data = pd.DataFrame({
'a': [1, 2, 3, 4, 5],
'b': [1, 2, 3, 4, 5]
})
print(data.head())
print(data.describe())
print(data.columns)
Or, which might be a little to verbose, just:
print(data)
Answered By - MaxNoe
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.