What are all the exceptions that can be thrown by pd.read_csv()?
In the example below I am capturing some exception types explicitly and using a generic Exception to catch the others, but what are the others exactly?
Reviewing the documentation for pandas read_csv() I can't see a complete list of exceptions thrown.
In a more general case, what is the recommended practice to determine all of the types of exceptions that can be thrown by any call/library?
import pandas as pd
try:
df = pd.read_csv("myfile.csv")
except FileNotFoundError:
print("File not found.")
except pd.errors.EmptyDataError:
print("No data")
except pd.errors.ParserError:
print("Parse error")
except Exception:
print("Some other exception")