how to index/query pandas dataframe in MATLAB

6 vues (au cours des 30 derniers jours)
Jin Young Jeon
Jin Young Jeon le 26 Mar 2019
Commenté : Walter Roberson le 26 Mar 2019
Hello,
I have a Python script that I run on MATLAB, which returns a variable in pandas dataframe named onset
Typing onset returns:
Python DataFrame with properties:
T: [1×1 py.pandas.core.frame.DataFrame]
at: [1×1 py.pandas.core.indexing._AtIndexer]
axes: [1×2 py.list]
blocks: [1×1 py.dict]
columns: [1×1 py.pandas.core.indexes.base.Index]
empty: 0
iat: [1×1 py.pandas.core.indexing._iAtIndexer]
iloc: [1×1 py.pandas.core.indexing._iLocIndexer]
index: [1×1 py.pandas.core.indexes.range.RangeIndex]
is_copy: [1×1 py.NoneType]
ix: [1×1 py.pandas.core.indexing._IXIndexer]
loc: [1×1 py.pandas.core.indexing._LocIndexer]
ndim: 2
shape: [1×2 py.tuple]
size: 2000
style: [1×1 py.pandas.io.formats.style.Styler]
values: [1×1 py.numpy.ndarray]
In Python, I would do something like onset.iloc[1]['condition'] to get the condition of index 1 item. How can I do so in MATLAB?
  1 commentaire
Walter Roberson
Walter Roberson le 26 Mar 2019
Experiment with onset.iloc(1).condition

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Call Python from MATLAB dans Help Center et File Exchange

Produits


Version

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by