|
705 | 705 | "\n", |
706 | 706 | " df = df.loc[carrier].groupby(level=2).sum().div(1e6) # TWh / MtCO2\n", |
707 | 707 | " df.index = [\n", |
708 | | - " i[:-1]\n", |
709 | | - " if ((i not in [\"co2\", \"NH3\", \"H2\"]) and (i[-1:] in [\"0\", \"1\", \"2\", \"3\"]))\n", |
710 | | - " else i\n", |
| 708 | + " (\n", |
| 709 | + " i[:-1]\n", |
| 710 | + " if ((i not in [\"co2\", \"NH3\", \"H2\"]) and (i[-1:] in [\"0\", \"1\", \"2\", \"3\"]))\n", |
| 711 | + " else i\n", |
| 712 | + " )\n", |
711 | 713 | " for i in df.index\n", |
712 | 714 | " ]\n", |
713 | 715 | "\n", |
|
771 | 773 | " df = df.groupby(level=2).sum().div(1e6)\n", |
772 | 774 | "\n", |
773 | 775 | " df.index = [\n", |
774 | | - " i[:-1]\n", |
775 | | - " if ((i not in [\"co2\", \"NH3\", \"H2\"]) and (i[-1:] in [\"0\", \"1\", \"2\", \"3\"]))\n", |
776 | | - " else i\n", |
| 776 | + " (\n", |
| 777 | + " i[:-1]\n", |
| 778 | + " if ((i not in [\"co2\", \"NH3\", \"H2\"]) and (i[-1:] in [\"0\", \"1\", \"2\", \"3\"]))\n", |
| 779 | + " else i\n", |
| 780 | + " )\n", |
777 | 781 | " for i in df.index\n", |
778 | 782 | " ]\n", |
779 | 783 | "\n", |
|
845 | 849 | " df = df.groupby(level=2).sum().div(1e6)\n", |
846 | 850 | "\n", |
847 | 851 | " df.index = [\n", |
848 | | - " i[:-1]\n", |
849 | | - " if ((i not in [\"co2\", \"NH3\", \"H2\"]) and (i[-1:] in [\"0\", \"1\", \"2\", \"3\"]))\n", |
850 | | - " else i\n", |
| 852 | + " (\n", |
| 853 | + " i[:-1]\n", |
| 854 | + " if ((i not in [\"co2\", \"NH3\", \"H2\"]) and (i[-1:] in [\"0\", \"1\", \"2\", \"3\"]))\n", |
| 855 | + " else i\n", |
| 856 | + " )\n", |
851 | 857 | " for i in df.index\n", |
852 | 858 | " ]\n", |
853 | 859 | "\n", |
|
3458 | 3464 | "\n", |
3459 | 3465 | " toprow_kwargs = (\n", |
3460 | 3466 | " dict(\n", |
3461 | | - " title=\"with\\nhydrogen grid\\n\"\n", |
3462 | | - " if y[1] == \"H2 grd\"\n", |
3463 | | - " else \"without\\nhydrogen grid\\n\"\n", |
| 3467 | + " title=(\n", |
| 3468 | + " \"with\\nhydrogen grid\\n\"\n", |
| 3469 | + " if y[1] == \"H2 grd\"\n", |
| 3470 | + " else \"without\\nhydrogen grid\\n\"\n", |
| 3471 | + " )\n", |
3464 | 3472 | " )\n", |
3465 | 3473 | " if x[0] == 0\n", |
3466 | 3474 | " else {}\n", |
|
0 commit comments