Skip to content

Commit

Permalink
Update data_processing.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
tilseb authored Jul 22, 2018
1 parent 1e0bfa9 commit 2579e12
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions data_processing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -519,25 +519,6 @@
"tvdf = pd.DataFrame(columns=[['td_total_Ttkm', 'td_short_Ttkm', 'td_noneca_Ttkm']], index=year)"
]
},
{
"cell_type": "raw",
"metadata": {
"collapsed": true
},
"source": [
"# Write time variant dataframe to csv\n",
"for s in scn:\n",
" for i in tvdf.columns:\n",
" r = reg[s].td_change\n",
" for y in year:\n",
" tvdf.loc[y, str(i)] = ship[i].sum()\n",
" # Calculate annual changing rate\n",
" r = (1 + r) ** (1 / (len(year) - 1)) - 1\n",
" if r != 0:\n",
" tvdf[i] *= ((1 + r) ** (tvdf.index - year[0]))\n",
" tvdf.to_csv(path + s + '/td.csv', encoding='utf8')"
]
},
{
"cell_type": "code",
"execution_count": 64,
Expand Down

0 comments on commit 2579e12

Please sign in to comment.