Open dunchay opened 6 years ago
The tops_from_csv
method creates a dataframe from the csv and adds the tops when the tops csv uwi matches the log uwi, source code found here.
Could you try this to debug?
lasfilepath = r'1044931248.las'
log = ptr.Log(lasfilepath)
# see the uwi of the log object
log_uwi = str(self.well['UWI'].value)
print(log_uwi)
tops_path = r'D:\Users\duncan.hay\Documents\python\petrophysics\tops.csv'
top_df = pd.read_csv(tops_path, dtype = {'uwi': str,'form': str, 'depth': float})
# see csv of tops
print(top_df.head())
# count matches from tops dataframe uwi to log uwi
# if this value is 0 then the uwi from the las file does not match the uwi in the csv
print((top_df.uwi == log_uwi).sum())
when I use...
it returns an empty dictionary meaning i cant use any of the additional functionality. The tops.csv is the exact same format as the example you give.
csv format: uwi,form,depth 1044931248,fm_1,800 1044931248,fm_2,2000.2 1044931248,fm_3,3000.5
Can you advise? Thanks