1. 程式人生 > >Python讀入txt檔案

Python讀入txt檔案

#-*- coding: utf-8 -*-
import os
import cv2
import shutil
import numpy as np
import math
import time
import sys
import pandas as pd

print(os.getcwd())

os.chdir('F:\\')

print('Work way has changed:\n',os.getcwd())

print(os.listdir())

text = pd.read_table('test.txt',header=None,sep='\s',engine='python')