Skip to content

Instantly share code, notes, and snippets.

@forest512
forest512 / ReadJamNp-panda.py
Created July 12, 2018 00:36
Used to get the number of discharged particles in jamming cases. At first, read the log.run/parallel file and then drop duplicates by "pandas" package of python.
#!/l/shanlin/anaconda3/bin/python
import numpy as np
import pandas as pd
from pandas import DataFrame
print("Read results of jamming cases.\n")
path= 'log.jamP'
ReadLines= open(path,'r')
data = []