|
| 1 | +# 📊 Python Data Science Snippets |
| 2 | + |
| 3 | +[Python Data Science Snippets](https://github.com/futureprogrammer360/Python-Data-Science-Snippets) is a collection of [Sublime Text](https://www.sublimetext.com/) snippets for data science and machine learning in Python. |
| 4 | + |
| 5 | +## 💻 Installation |
| 6 | + |
| 7 | +The easiest way to install Python Data Science Snippets is through [Package Control](https://packagecontrol.io/packages/Python%20Data%20Science%20Snippets). After it is enabled inside Sublime Text, open the command palette and find **Package Control: Install Package** and press `ENTER`. Then, find **Python Data Science Snippets** in the list. Press `ENTER` again, and this package is installed! |
| 8 | + |
| 9 | +## 📈 Snippets |
| 10 | + |
| 11 | +* [Imports](#imports) |
| 12 | +* [NumPy](#numpy) |
| 13 | +* [Pandas](#pandas) |
| 14 | +* [Matplotlib](#matplotlib) |
| 15 | +* [Scikit-learn](#scikit-learn) |
| 16 | +* [Keras](#keras) |
| 17 | + |
| 18 | +### Imports |
| 19 | + |
| 20 | +Import snippets start with `i` followed by the package's import alias. |
| 21 | + |
| 22 | +| Trigger | Description | |
| 23 | +|------------|-----------------------------------| |
| 24 | +| `ikeras` | `from tensorflow import keras` | |
| 25 | +| `inp` | `import numpy as np` | |
| 26 | +| `ipd` | `import pandas as pd` | |
| 27 | +| `iplt` | `import matplotlib.pyplot as plt` | |
| 28 | +| `isklearn` | `from sklearn.$1 import $2` | |
| 29 | +| `isns` | `import seaborn as sns` | |
| 30 | +| `itf` | `import tensorflow as tf` | |
| 31 | +| `itorch` | `import torch` | |
| 32 | + |
| 33 | +### NumPy |
| 34 | + |
| 35 | +| Trigger | Description | |
| 36 | +|------------|----------------| |
| 37 | +| `arange` | `np.arange` | |
| 38 | +| `array` | `np.array` | |
| 39 | +| `linspace` | `np.linspace` | |
| 40 | +| `logspace` | `np.logspace` | |
| 41 | +| `ones` | `np.ones` | |
| 42 | +| `zeros` | `np.zeros` | |
| 43 | + |
| 44 | +### Pandas |
| 45 | + |
| 46 | +| Trigger | Description | |
| 47 | +|------------|----------------| |
| 48 | +| `columns` | `df.columns` | |
| 49 | +| `describe` | `df.describe` | |
| 50 | +| `df` | `pd.DataFrame` | |
| 51 | +| `head` | `df.head` | |
| 52 | +| `read_csv` | `pd.read_csv` | |
| 53 | +| `ser` | `pd.Series` | |
| 54 | +| `tail` | `df.tail` | |
| 55 | + |
| 56 | +### Matplotlib |
| 57 | + |
| 58 | +| Trigger | Description | |
| 59 | +|------------|----------------| |
| 60 | +| `bar` | `plt.bar` | |
| 61 | +| `legend` | `plt.legend` | |
| 62 | +| `pie` | `plt.pie` | |
| 63 | +| `plot` | `plt.plot` | |
| 64 | +| `scatter` | `plt.scatter` | |
| 65 | +| `show` | `plt.show` | |
| 66 | +| `subplots` | `plt.subplots` | |
| 67 | +| `title` | `plt.title` | |
| 68 | +| `xlabel` | `plt.xlabel` | |
| 69 | +| `ylabel` | `plt.ylabel` | |
| 70 | + |
| 71 | +### Scikit-learn |
| 72 | + |
| 73 | +| Trigger | Description | |
| 74 | +|----------|--------------------------| |
| 75 | +| `knn` | `KNeighborsClassifier` | |
| 76 | +| `linreg` | `LinearRegression` | |
| 77 | +| `logreg` | `LogisticRegression` | |
| 78 | +| `rfc` | `RandomForestClassifier` | |
| 79 | +| `tts` | `train_test_split` | |
| 80 | + |
| 81 | +### Keras |
| 82 | + |
| 83 | +| Trigger | Description | |
| 84 | +|--------------|---------------------------| |
| 85 | +| `compile` | `model.compile` | |
| 86 | +| `fit` | `model.fit` | |
| 87 | +| `layer` | `keras.layers.layer` | |
| 88 | +| `load_model` | `keras.models.load_model` | |
| 89 | +| `save` | `model.save` | |
| 90 | +| `sequential` | `keras.Sequential` | |
| 91 | + |
| 92 | +The snippet files are in the `snippets` folder of [this GitHub repository](https://github.com/futureprogrammer360/Python-Data-Science-Snippets). |
0 commit comments