i have the following dataframe:
FAK_ART FAK_DAT LEIST_DAT KD_CRM MW_BW EQ_NR MATERIAL \
0 ZPAF 2015-05-18 2015-05-31 D E 100107 S
1 ZPAF 2015-05-18 2015-05-31 D B 100107 S
2 ZPAF 2015-05-18 2015-05-31 D E 100108 S
3 ZPAF 2015-05-18 2015-05-31 D B 100108 S
4 ZPAF 2015-05-18 2015-05-31 D E 100109 S
5 ZPAF 2015-05-18 2015-05-31 D B 100109 S
6 ZPAF 2015-05-18 2015-05-31 D E 100110 S
7 ZPAF 2015-05-18 2015-05-31 D B 100110 S
8 ZPAF 2015-05-18 2015-05-31 D E 100111 S
. . .
387976 ZPAF 2016-02-12 2016-02-29 CP B 100686 S
387977 ZPAF 2016-02-12 2016-02-29 CP B 100686 S
387978 ZPAF 2016-02-12 2016-02-29 CP E 100712 S
387979 ZPAF 2016-02-12 2016-02-29 CP B 100712 S
387980 ZPAF 2016-02-12 2016-02-29 CP E 100735 S
387981 ZPAF 2016-02-12 2016-02-29 CP B 100735 S
387982 ZPAF 2016-02-12 2016-02-29 CP B 100735 S
387983 ZPAF 2016-02-12 2016-02-29 CP E 100748 S
387984 ZPAF 2016-02-12 2016-02-29 CP B 100748 S
387985 ZPAF 2016-02-12 2016-02-29 CP E 100760 S
now i want to select only the rows with the date 2015-05-31.
i tried little bit around to handle it with date_range but i always get errors:
ValueError: Length of values does not match length of index
or
ValueError: Must specify two of start, end, or periods
my idea was that:
data_faktura['LEIST_DAT'] = pd.date_range('2016-01-31', '2016-01-31')
but then i get an error!
How can i fix or solve that?
data_fakture[data_faktura['LEIST_DAT'] == '2016-01-31']