You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/05-dicts.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -147,6 +147,23 @@ Combine dictionary access and DataFrame indexing:
147
147
data["expression"].loc["Gata1", :]
148
148
```
149
149
150
+
But this does not work like that - does it?
151
+
152
+
Remember what ``data["expression"]`` is - a ndarray that is very efficient for calculations.
153
+
But it lacks row and column names. We have stored row and column data in ``genes`` and ``samples``. Actually the gene names are stored in the rownames of the genes object.
154
+
155
+
```python
156
+
print (data['genes'].index)
157
+
data['genes'].index =="Gata1"
158
+
```
159
+
160
+
Do you remember how to subset a ndarray using a boolean array? Try it!
0 commit comments