Commit 4791a5e8 authored by linfang.wang's avatar linfang.wang

xgb boost done

parent 37c70174
......@@ -11,8 +11,8 @@ def buildDocument(path,filename):
return Document()
def saveDocument(document,path,filename):
if str.rfind(filename,0,3)!='doc':
if str.rfind(filename,0,4) !='docx':
if filename[-3:] != 'doc':
if filename[-4:] != 'docx':
raise ValueError('{} is not a word file'.format(filename))
return document.save(os.path.join(path,filename))
......
......@@ -101,7 +101,8 @@ def draw_barplot(df,x,y,hue='',title=''):
pltz = PyplotZ()
pltz.enable_chinese()
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
# ax = fig.add_subplot(1, 1, 1)
plt.cla()
sns.set(style="whitegrid")
fig = plt.figure(figsize=(6, 4))
......@@ -116,7 +117,7 @@ def draw_barplot(df,x,y,hue='',title=''):
pltz.title(title)
pltz.legend()
plt.grid()
plt.show()
# plt.show()
return fig
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment