Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
import pandas as pd | |
import glob | |
%matplotlib inline | |
csv_files_hr = glob.glob('HR/*.json') | |
heart_df = pd.DataFrame() | |
for f in csv_files_hr: | |
hr = pd.read_json(f,typ='series') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dt = pd.datetime.now().date() | |
df_pic['経験年数'] = ((dt - df_pic['入社日付'].dt.date).dt.days / 365).round(0).astype(int) | |
df_pic.head() | |
def graph_histogram(data,title,binwidth=5): | |
""" | |
ヒストグラムを描く関数 | |
""" | |
plt.hist(data, bins=range(0, max(data)+1+ binwidth, binwidth)) | |
plt.title(title) | |
plt.xlabel("day") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#parse_datesをで対象の列を指定すると文字列の20170601を2017-06-01の日付型にしてくれる | |
import pandas as pd | |
df_pic = pd.read_csv("data/社員マスタ.csv",index_col="社員コード", parse_dates=['入社日付'] ) | |
df_pic.info() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: UTF-8 | |
#------------------------------------------------------------------------------- | |
# Name: 数量化3類実行プログラム | |
# Purpose: 数量化3類をPython Numpyで実行する | |
# Reference: Excelで学ぶコレスポンデンス分析,高橋信,オーム社,2005 | |
# Author: Takao Aoki | |
# Created: 2013/01/20 | |
# Copyright: Takao Aoki(c) 2013 | |
# Licence: GNU GPL | |
# Description: 数量化3類とは、生データの回答者および変数に生データの情報が |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
テストだよ。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import wsgiref.handlers | |
from google.appengine.ext import webapp | |
import os | |
from google.appengine.ext.webapp import template | |
class MainHandler(webapp.RequestHandler): | |
def get(self): | |
fpath =os.path.join(os.path.dirname(__file__),'views','index.html') | |
html = template.render(fpath, None) | |
self.response.out.write(html) |