- API reference
- Testing
- pandas.error...
pandas.errors.PerformanceWarning#
- exceptionpandas.errors.PerformanceWarning[source]#
Warning raised when there is a possible performance impact.
Examples
>>>df=pd.DataFrame({"jim":[0,0,1,1],..."joe":["x","x","z","y"],..."jolie":[1,2,3,4]})>>>df=df.set_index(["jim","joe"])>>>df joliejim joe0 x 1 x 21 z 3 y 4>>>df.loc[(1,'z')]# PerformanceWarning: indexing past lexsort depth may impact performance.df.loc[(1, 'z')] joliejim joe1 z 3
On this page