This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
data:data_analysis_manual:read_catalog_python [2022/06/22 13:49] eric buchlin update catalog reading script |
data:data_analysis_manual:read_catalog_python [2022/08/27 09:54] eric buchlin Mention CSV catalog |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== How to read the UiO FITS files catalog in Python ====== | ====== How to read the UiO FITS files catalog in Python ====== | ||
+ | |||
+ | The following script is for reading the text format catalog. Now UiO also provides a CSV catalog. | ||
<file python read_uio_cat.py> | <file python read_uio_cat.py> | ||
Line 40: | Line 42: | ||
parse_dates=date_columns, date_parser=date_parser, | parse_dates=date_columns, date_parser=date_parser, | ||
low_memory=False) | low_memory=False) | ||
- | # remove additional spaces from strings | ||
- | for column in ["LEVEL", "STUDYTYP", "PURPOSE"]: | ||
- | df[column] = df[column].apply(lambda string: string.strip()) | ||
return df | return df | ||
</file> | </file> |