  We calculate cross section for production of $D$ mesons and $\Lambda_c$
baryons in proton-proton collisions at the LHC. The cross section for
production of $c \bar c$ pairs is calculated within $k_T$-factorization
approach with the Kimber-Martin-Ryskin unintegrated gluon distributions
obtained on the basis of modern collinear gluon distribution functions. We show
that our approach well describes the $D^0$, $D^+$ and $D_s$ experimental data.
We try to understand recent ALICE and LHCb data for $\Lambda_c$ production with
the $c \to \Lambda_c$ independent parton fragmentation approach. The Peterson
fragmentation functions are used. The $f_{c \to \Lambda_c}$ fragmentation
fraction and $\varepsilon_{c}^{\Lambda}$ parameter for $c \to \Lambda_c$ are
varied. As a control plot we show transverse momentum distribution of different
species of $D$ mesons assuming standard values of the $f_{c \to D}$
fragmentation fractions known from the literature. The fraction $f_{c \to
\Lambda_c}$ neccessary to describe the ALICE data is much larger than the
average value obtained from $e^+ e^-$ or $e p$ experiments. No drastic
modification of the shape of fragmentation function is allowed by the new ALICE
and LHCb data for $\Lambda_c$ production. We also discuss a possible dependence
of the $\Lambda_c/ D^0$ baryon-to-meson ratio on rapidity and transverse
momentum as seems observed recently by the ALICE and LHCb collaborations. Three
different effects are considered: the value of $\varepsilon_c^{\Lambda}$
parameter in Peterson fragmentation function for $c \to \Lambda_c$, a
kinematical effect related to the hadronization prescription and a possible
feed-down from higher charmed-baryon excitations. It seems very difficult, if
not impossible, to understand the ALICE data within the considered independent
parton fragmentation scheme.
