Skip to content

Commit

Permalink
modify data,code
Browse files Browse the repository at this point in the history
  • Loading branch information
ttakuya committed Apr 11, 2018
1 parent f2c2950 commit 3a692a4
Show file tree
Hide file tree
Showing 193 changed files with 3 additions and 3 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ load_hotel_reserve()
reserve_tb %>%

# as.Date関数によって、文字列を日付型に変換
# (第9章「9-1 カテゴリ型への変換」で解説)
# (第9章「9-1 文字列、数値から日時型、日付型への変換」で解説)
# between関数によって、checkin_dateの値の範囲指定
filter(between(as.Date(checkin_date),
as.Date('2016-10-12'), as.Date('2016-10-13')))
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ library(mice)
# mice関数を利用するためにデータ型を変換(mice関数内でモデル構築をするため)
production_missn_tb$type <- as.factor(production_missn_tb$type)

# fault_flgが文字列の状態なのでブール型に変換(「第9章 カテゴリ型」で解説
# fault_flgが文字列の状態なのでブール型に変換(「第9章 カテゴリ型で解説
production_missn_tb$fault_flg <- production_missn_tb$fault_flg == 'TRUE'

# mice関数にpmmを指定して、多重代入法を実施
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# 下の行から本書スタート
# sexがmanのときにTRUEとするブール型を追加
# このコードは、astype関数を利用しなくてもブール型に変換
# このコードは、as.type関数を利用しなくてもブール型に変換
customer_tb[['sex_is_man']] = (customer_tb[['sex']] == 'man').astype('bool')

# sexをカテゴリ型に変換
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 3a692a4

Please sign in to comment.