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: Utilities/Python/scripts/README.md
+16-1Lines changed: 16 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,17 @@
4
4
5
5
This step will get you 90% of the way there. Then there usually a few extra steps to get a working script.
6
6
7
+
#### Use pandas.read_csv
8
+
9
+
I'd like to standardize on using Pandas for reading csv files. This is not a hard rule, but there are many options and it would help if we are consistent. You can give this instruction to your AI prior to your conversion. You should end up with
10
+
```
11
+
import pandas as pd
12
+
```
13
+
at the top of your script and you read the csv file with, for example,
14
+
```
15
+
fds_data = pd.read_csv(fds_file, skiprows=2, header=None) # note: your header row may be different and remember Python is 0 based
16
+
```
17
+
7
18
## 2. Import `fdsplotlib`
8
19
9
20
You will use this library for the Matlab equivalent of `plot_style` and `addverstr`. At the top of your script add the following:
@@ -12,7 +23,11 @@ You will use this library for the Matlab equivalent of `plot_style` and `addvers
12
23
import fdsplotlib
13
24
```
14
25
15
-
For now, we will assume that you are running your scripts from the `fds/Utilities/Python/` directory where `fdsplotlib` lives. If you need to run your python scripts from another directory, you need to add `fds/Utilities/Python/` to the path or else copy `fdsplotlibl.py` to your working directory.
26
+
To make sure `fdsplotlib` is visible to all your python scripts add the following to your `~/.bashrc`
ax2.set_ylabel("Mass Loss Rate × 1000 (1/s)",color=color2,fontdict={"fontname": plot_style["Font_Name"], "fontsize": plot_style["Label_Font_Size"]})
120
+
ax2.set_ylabel("Normalized Mass Loss Rate × 1000 (1/s)",color=color2,fontdict={"fontname": plot_style["Font_Name"], "fontsize": plot_style["Label_Font_Size"]})
0 commit comments