반응형 Python51 [공유] tensorflow 자연어 처리 https://codetorial.net/tensorflow/natural_language_processing_in_tensorflow_01.html 22. 자연어 처리하기 1 - Codetorial 이제 TensorFlow를 이용해서 자연어를 처리하는 방법에 대해서 알아봅니다. 텍스트를 단어 기반으로 토큰화함으로써 Neural Network에 사용하기 적합한 형태로 변환하는 방법에 대해 소개합니다. 순서 codetorial.net 2021. 10. 23. Colab에서 파일 불러오는 방법 Colab을 사용할 때 로컬 파일 불러오는 방법은 다음과 같다. 1) 아래의 코드를 실행하면, 파일 선택이라는 버튼이 뜬다. from google.colab import files file = files.upload() 2) 원하는 파일을 선택하면 아래처럼 파일을 불러들인 것을 성공했다는 메시지가 보인다. 3) io.StringIO를 이용해 파일을 읽어와 dataframe을 생성할 수 있다. import io import pandas as pd df = pd.read_csv(io.StringIO(uploaded['train.csv'].decode('utf-8'))) 출처 : https://grooot.tistory.com/7 Colab 로컬에서 파일 불러오기 "Colab" 은 Google Research.. 2021. 10. 19. [python] def 뒤에 -> 의미 def to_hex(image_id) -> str: return '{0:0{1}x}'.format(image_id, 16) def 뒤에 ->가 오는 이유는 return이 어떤 값인지 알려주기 위해 사용한다. 위의 경우는 -> str이 적혀있기 때문에, string 형태로 반환한다. 출처 : https://wotres.tistory.com/entry/def-%EB%92%A4%EC%97%90-None-%EB%98%90%EB%8A%94-str-%EC%9D%98%EB%AF%B8 2021. 9. 12. 이전 1 ··· 6 7 8 9 다음 반응형