update
This commit is contained in:
9
pandas-snippets.md
Normal file
9
pandas-snippets.md
Normal file
@ -0,0 +1,9 @@
|
||||
- [Basics](#basics)
|
||||
|
||||
# Basics
|
||||
|
||||
```python
|
||||
df.loc[:, "D"] = np.array([5] * len(df))
|
||||
df.loc[:, ["A", "B"]]
|
||||
df.sort_index(axis=1, ascending=False) #axis=1 sort columns by labels, axis=0 sort by index
|
||||
```
|
||||
Reference in New Issue
Block a user