[英]How to load .gds file into Pandas?
you need to change the encoding and read the data using latin1
您需要更改编码并使用
latin1
读取数据
import pandas as pd
df = pd.read_csv('example.gds',header=27,encoding='latin1')
will get you the data file, also you need to skip the first 27 rows of data for the real pandas meat of the file.将为您提供数据文件,您还需要跳过文件的真正 pandas 肉的前 27 行数据。
The gdspy
package comes handy for such applications. gdspy
package 非常适合此类应用。 For example:例如:
import numpy
import gdspy
gdsii = gdspy.GdsLibrary(infile="filename.gds")
main_cell = gdsii.top_level()[0] # Assume a single top level cell
points = main_cell.polygons[0].polygons[0]
for p in points:
print("Points: {}".format(p))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.