make fname private class variable
@@ -4,9 +4,10 @@ import numpy as np
class CoalMining():
+ __fname = "data/coal-mining-disaster-data.csv"
+
def __init__(self):
- FILE = "data/coal-mining-disaster-data.csv"
- self._data = pd.read_csv(FILE, names=["year", "count"]).set_index("year")
+ self._data = pd.read_csv(CoalMining.__fname, names=["year", "count"]).set_index("year")
def model(self):
start_year, end_year = (self._data.index.min(), self._data.index.max())
