質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

Q&A

0回答

908閲覧

.CSV files convert into python model but there is one issue columns contains string and bool values

AliHassan

総合スコア351

Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

0グッド

0クリップ

投稿2018/06/25 11:41

編集2018/06/25 11:45

i have a .csv file , in which 12 , 3 columns have string values and 1 have bool value now i can parse .csv file according to python model. so that tensorflow operation apply on it

def parse_csv(line): pokemon_dataset= [[0],[""], [""], [""], [0], [0], [0], [0], [0], [0], [0], [1]] line_ = tf.decode_csv(line, pokemon_dataset) pokemon_features = tf.reshape(line_[:-1], shape = (11,)) pokemon_label = tf.reshape(line_[:-1] , shape = ()) return pokemon_features,pokemon_label

i can parse like this but compiler generate error

TypeError: Cannot convert a list containing a tensor of dtype <dtype: 'string'> to <dtype: 'int32'> (Tensor is: <tf.Tensor 'DecodeCSV:1' shape=() dtype=string>)

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

YouheiSakurai

2018/06/25 16:17

Example of line is missing to guess what causes it.
AliHassan

2018/06/25 16:21

??? i don't understand
YouheiSakurai

2018/06/25 16:23

You feed line to parse_csv function, right?
YouheiSakurai

2018/06/25 16:32 編集

Without it, who can have clear image of your problem? You are asking something about result without showing example of cause, that is missing piece.
AliHassan

2018/06/25 16:46

okay boss i will share you my code
YouheiSakurai

2018/06/25 17:01

Please review and modify your question to make it standalone. I’m considering publicity of this question. If you don’t take care about it, then it should be paid-support in my personal opinion.
AliHassan

2018/06/25 17:04

i'm concern answer of my question , you can publish it where you want ...... enjoy
YouheiSakurai

2018/06/25 17:06

OK, our motivations are not crossed unfortunately. Thanks, enjoy your time. :)
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問