Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

loading .dat file in python

import numpy as np

data = np.genfromtxt('sample.dat',
                     skip_header=1,
                     skip_footer=1,
                     names=True,
                     dtype=None,
                     delimiter=' ')
print(data)
# Output: [(1, 4, 6, 8, 3) (4, 5, 6, 8, 9) (2, 3, 6, 8, 5)]
Comment

PREVIOUS NEXT
Code Example
Python :: python while loop and recursion 
Python :: Write a Python program to accept two strings as input and check if they are identical copy of each other or if the second string is a substring of the first string. 
Python :: make row readonly tablewidget pyqt 
Python :: python returning rows and columns from a matrix string 
Python :: pyevtk documentation writearraystovtk 
Python :: medium seaaborn mathplot diesign styles 
Python :: keylogger to exe 
Python :: pss signatures python 
Python :: Installez django-cruds-adminlte 
Python :: sphinx, where to write the glossary of a sofware project 
Python :: compter des valeur consecutives en python 
Shell :: remove steam from ubuntu 
Shell :: Could not find the implementation for builder @angular-devkit/build-angular:dev-server 
Shell :: Please install the gcc make perl packages from your distribution. 
Shell :: git update gitignore 
Shell :: debian disable ipv6 
Shell :: apache2.service is not active cannot reload. ubuntu 
Shell :: choco list installed 
Shell :: kill ubuntu port 
Shell :: install zlib ubuntu 
Shell :: install material ui 
Shell :: install discord module py 
Shell :: find my ip mac terminal 
Shell :: remove git credentials terminal 
Shell :: Unmet dependencies. 
Shell :: zsh: command not found: gatsby 
Shell :: install tmux ubuntu 
Shell :: not digitally signed. you cannot run this script on the current system 
Shell :: git delete local branch except master 
Shell :: uninstall webpack globally 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =