Pandas: slow date conversion

Note: As @ritchie46’s answer states, this solution may be redundant since pandas version 0.25 per the new argument cache_dates that defaults to True Try using this function for parsing dates: def lookup(date_pd_series, format=None): “”” This is an extremely fast approach to datetime parsing. For large data, the same dates are often repeated. Rather than re-parse … Read more

numpy convert categorical string arrays to an integer array

np.unique has some optional returns return_inverse gives the integer encoding, which I use very often >>> b, c = np.unique(a, return_inverse=True) >>> b array([‘a’, ‘b’, ‘c’], dtype=”|S1″) >>> c array([0, 1, 2, 0, 1, 2]) >>> c+1 array([1, 2, 3, 1, 2, 3]) it can be used to recreate the original array from uniques >>> … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)