@Aditya's answer is already very good. I just want to contribute an alternative.
We can consider that pandas pd.to_datetime has a built in parser that can take as input a datetime string. We can construct these strings to look like a standard
5/JUl/2018 T2:48:29
This is a standard format and is well understood by pandas.
This following dataframe
data = {'mm': ['JUl', 'Jul', 'Jul', 'Jul'],
'dd': ['5', '5', '5', '5'],
'time': ['2:48:29', '2:48:29', '2:48:29', '2:50:47'],
'yyyy': ['2018', '2018', '2018', '2018']}
df = pd.DataFrame(data)

We can get the desired column by doing
df['formatted_datetime'] = pd.to_datetime(df['dd'] + '/' + df['mm'] + '/' + df['yyyy'] + ' T' + df['time'])

We can also verify the types using
df.dtypes
dd object
mm
object
time object
yyyy
object
formatted_datetime datetime64[ns]
dtype: object
Plotting the columns
You will notice that when you try to plot this df you will get an error, this is because matplotlib cannot handle datetime objects in their plot function. They do have an alternative plot_date function which can be used as
plt.plot_date(df['formatted_datetime'], df['dev'])
plt.show()
For example, we will recreate the same data as above with the dev column as well. We will do the same type conversion for the datetime.
data = {'mm': ['JUl', 'Jul', 'Jul', 'Jul'],
'dd': ['5', '5', '5', '5'],
'time': ['2:48:29', '2:48:29', '2:48:29', '2:50:47'],
'yyyy': ['2018', '2018', '2018', '2018'],
'dev': ['aaa', 'aaa', 'aaa', 'bbb']}
df = pd.DataFrame(data)
df['formatted_datetime'] = pd.to_datetime(df['dd'] + '/' + df['mm'] + '/' +
df['yyyy'] + ' T' + df['time'])
Now we will convert the categorical value of dev into numerical values, we will also keep track of this conversion so that we can set them on y-axis ticks.
df['dev'] =df['dev'].astype('category')
categorie_codes = dict(enumerate(df['dev'].cat.categories))
df['dev'] =df['dev'].cat.codes

Then we can plot
plt.plot_date(df['formatted_datetime'], df['dev'])
plt.yticks(range(len(categorie_codes)), list(categorie_codes.values()))
plt.show()
