<?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE article PUBLIC "-//NLM/DTD JATS (Z39.96) Journal Publishing DTD v1.2 20120330//EN" "http://jats.nlm.nih.gov/publishing/1.2/JATS-journalpublishing1.dtd">
    <!--<?xml-stylesheet type="text/xsl" href="article.xsl">-->
<article xmlns:ns0="http://www.w3.org/1999/xlink" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" article-type="research-article" dtd-version="1.2" xml:lang="en">
	<front>
		<journal-meta>
			<journal-id journal-id-type="issn">2303-9868</journal-id>
			<journal-id journal-id-type="eissn">2227-6017</journal-id>
			<journal-title-group>
				<journal-title>International Research Journal</journal-title>
			</journal-title-group>
			<issn pub-type="epub">2303-9868</issn>
			<publisher>
				<publisher-name>Cifra LLC</publisher-name>
			</publisher>
		</journal-meta>
		<article-meta>
			<article-id pub-id-type="doi">10.60797/IRJ.2026.170.33</article-id>
			<article-categories>
				<subj-group>
					<subject>Brief communication</subject>
				</subj-group>
			</article-categories>
			<title-group>
				<article-title>Research on the use of Pandas, Polars and PySpark libraries to analyze the large-scale Expedia Hotel Recommendations dataset</article-title>
			</title-group>
			<contrib-group>
				<contrib contrib-type="author" corresp="yes">
					<contrib-id contrib-id-type="orcid">https://orcid.org/0000-0003-1017-5544</contrib-id>
					<contrib-id contrib-id-type="rinc">https://elibrary.ru/author_profile.asp?id=113391</contrib-id>
					<contrib-id contrib-id-type="rid">https://publons.com/researcher/ADM-9626-2022</contrib-id>
					<name>
						<surname>Ilichev</surname>
						<given-names>Vladimir Yurevich</given-names>
					</name>
					<email>patrol8@yandex.ru</email>
					<xref ref-type="aff" rid="aff-2">2</xref>
				</contrib>
				<contrib contrib-type="author">
					<contrib-id contrib-id-type="rinc">https://elibrary.ru/author_profile.asp?id=156233</contrib-id>
					<name>
						<surname>Fedorov</surname>
						<given-names>Viktor Olegovich</given-names>
					</name>
					<email>fedorov_vo@bmstu.ru</email>
					<xref ref-type="aff" rid="aff-1">1</xref>
				</contrib>
			</contrib-group>
			<aff id="aff-1">
				<institution-wrap>
					<institution-id institution-id-type="ROR">https://ror.org/00pb8h375</institution-id>
					<institution content-type="education">Bauman Moscow State Technical University</institution>
				</institution-wrap>
			</aff>
			<aff id="aff-2">
				<label>2</label>
				<institution>Bauman Moscow State Technical University</institution>
			</aff>
			<pub-date publication-format="electronic" date-type="pub" iso-8601-date="2026-08-17">
				<day>17</day>
				<month>08</month>
				<year>2026</year>
			</pub-date>
			<pub-date pub-type="collection">
				<year>2026</year>
			</pub-date>
			<volume>6</volume>
			<issue>170</issue>
			<fpage>1</fpage>
			<lpage>6</lpage>
			<history>
				<date date-type="received" iso-8601-date="2026-05-16">
					<day>16</day>
					<month>05</month>
					<year>2026</year>
				</date>
				<date date-type="accepted" iso-8601-date="2026-07-06">
					<day>06</day>
					<month>07</month>
					<year>2026</year>
				</date>
			</history>
			<permissions>
				<copyright-statement>Copyright: &amp;#x00A9; 2022 The Author(s)</copyright-statement>
				<copyright-year>2022</copyright-year>
				<license license-type="open-access" xlink:href="http://creativecommons.org/licenses/by/4.0/">
					<license-p>
						This is an open-access article distributed under the terms of the Creative Commons Attribution 4.0 International License (CC-BY 4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited. See 
						<uri xlink:href="http://creativecommons.org/licenses/by/4.0/">http://creativecommons.org/licenses/by/4.0/</uri>
					</license-p>
					.
				</license>
			</permissions>
			<self-uri xlink:href="https://research-journal.org/archive/8-170-2026-august/10.60797/IRJ.2026.170.33"/>
			<abstract>
				<p>With the exponential growth of data in the travel and hospitality industry, there is an urgent need for high-performance tools to process and analyze it. This paper presents a comprehensive study on the use of modern Pandas, Polars and PySpark libraries for Python using the example of an analysis of the large Expedia Hotel Recommendations dataset. The purpose of the study is to quantify and compare their effectiveness in solving three key machine learning problems: regression (predicting orig_destination_distance — distance to the hotel), clustering (segmentation of user requests) and classification (is_booking — predicting the fact of booking). During the experiments, a direct comparison of libraries was made in terms of runtime and RAM consumption on the same computing configuration. The results show that Polars outperforms Pandas and PySpark (when used locally) in speed and memory savings for ETL operations, and provides more consistent performance when scaled.</p>
			</abstract>
			<kwd-group>
				<kwd>Polars</kwd>
				<kwd> big data analysis</kwd>
				<kwd> Expedia Hotel Recommendations</kwd>
				<kwd> regression</kwd>
				<kwd> clustering</kwd>
				<kwd> classification</kwd>
				<kwd> machine learning</kwd>
				<kwd> data processing</kwd>
				<kwd> Python</kwd>
				<kwd> recommendation systems</kwd>
			</kwd-group>
		</article-meta>
	</front>
	<body>
		<sec>
			<title>HTML-content</title>
			<p>1. Introduction</p>
			<p>Modern digital platforms in the field of tourism generate colossal amounts of data on user behavior, which creates both opportunities and challenges for analysts. The Expedia Hotel Recommendations dataset </p>
			<p>[1][2][3]</p>
			<p>2. Research methods and principles</p>
			<p>The study was conducted within the framework of the methodology of reproducible experimental analysis of data using the principles of controlled comparative testing. To ensure comparability of results, all computational experiments were performed on a single hardware and software platform with a fixed resource configuration.</p>
			<p>Computational experiments were conducted on a server platform with the following specifications:</p>
			<p>– Computing resources: dual-processor configuration based on Intel Xeon E5-2686 v4 (Broadwell architecture, 14 cores/28 threads per processor, frequency 2,3 GHz), a total of 28 physical cores and 56 logical threads;</p>
			<p>– RAM: 64 GB DDR4-2400 ECC with multi-channel architecture;</p>
			<p>– Operating system: Ubuntu 22.04 LTS with Linux kernel 5.15;</p>
			<p>– The runtime environment is Python 3.11.</p>
			<p>The following library versions were used:</p>
			<p>– Polars 1.4.1 — a library for processing structured data based on Apache Arrow with a lazy execution model;</p>
			<p>– Pandas 2.2.0 — a classic library for data manipulation in DataFrame format;</p>
			<p>– PySpark 3.5.0 — a distributed framework for processing big data (used in local mode with a configuration of 16 worker threads).</p>
			<p>The public Expedia Hotel Recommendations dataset (train.csv file) was used as a data source, containing anonymized records of user search queries and booking transactions on the Expedia platform. Dataset characteristics:</p>
			<p>– Data volume: 5.2 GB in CSV format;</p>
			<p>– Number of records: 38,195,000 rows;</p>
			<p>– Number of features: 18 attributes.</p>
			<p>Data preprocessing was carried out using a standardized pipeline, which included four consecutive stages:</p>
			<p>– Data loading: initialization of the data structure from a CSV file with automatic type inference.</p>
			<p>– Filtering invalid records: excluding rows with incorrect values of critical attributes (srch_adults_count ≤ 0, orig_destination_distance ≤ 0) to ensure the quality of the training set.</p>
			<p>– Feature engineering: extracting time components (day of the week) from the date_time field to enrich the feature space.</p>
			<p>– Aggregation and grouping: calculation of statistical metrics (average booking frequency) in the context of hotel clusters to analyze patterns of user behavior.</p>
			<p>To make an objective comparison of performance, three alternative implementations of identical data processing operations were used:</p>
			<p>– Polars (lazy execution): using a lazy execution model with the construction of an optimized query plan before the actual execution of operations;</p>
			<p>– Pandas (eager execution): imperative approach with immediate execution of operations and materialization of intermediate results;</p>
			<p>– PySpark (distributed processing): a distributed model of processing in local mode with a simulation of a cluster architecture.</p>
			<p>The comparison criteria were: operation time (latency), peak RAM consumption, scalability with an increase in the amount of data.</p>
			<p>A sample of 6 million records (stratified random sample to ensure representativeness) was used to assess the impact of preprocessing quality on machine learning outcomes. Three classes of algorithms were used:</p>
			<p>– Regression (forecasting the distance to the hotel):</p>
			<p>Algorithm: Random Forest Regressor</p>
			<p>Number of trees: 100 (n_estimators = 100)</p>
			<p>Splitting criterion: mean squared error</p>
			<p>Target variable: orig_destination_distance</p>
			<p>– Classification (prediction of the fact of booking):</p>
			<p>Algorithm: Random Forest Classifier</p>
			<p>Number of trees: 200 (n_estimators = 200)</p>
			<p>Class balancing: class_weight = 'balanced' (automatic adjustment of weights to compensate for class imbalance)</p>
			<p>Target variable: booking_bool (binary class)</p>
			<p>– Clustering (user request segmentation):</p>
			<p>Algorithm: K-Means</p>
			<p>Number of clusters: 4 (n_clusters = 4)</p>
			<p>Feature space: numeric attributes srch_adults_count, srch_children_count, srch_room_count</p>
			<p>All models were trained on identical feature spaces prepared by each of the three tools, which made it possible to isolate the influence of the preprocessing tool from the influence of the model architecture. Quality assessment was performed on a test sample (20% of the data, i.e., 1,2 million records) using RMSE, accuracy, F1-score and silhouette score metrics.</p>
			<p>3. Main results</p>
			<p>Based on the results of the experiment, a quantitative assessment of performance was made. Table 1 shows the specific measured indicators for the key Polars, Pandas and PySpark comparison operations when processing the Expedia Hotel Recommendations dataset.</p>
			<table-wrap id="T1">
				<label>Table 1</label>
				<caption>
					<p>Run time (seconds) and memory consumption (GB)</p>
				</caption>
				<table>
					<tr>
						<td>Operation</td>
						<td>Polars (lazy)</td>
						<td>Pandas</td>
						<td>PySpark</td>
						<td>Polars vs Pandas Speedup</td>
					</tr>
					<tr>
						<td>CSV Loading (5,2 GB)</td>
						<td>18,3</td>
						<td>124,7</td>
						<td>89,2</td>
						<td>6,8×</td>
					</tr>
					<tr>
						<td>Filtering + creating 'weekday'</td>
						<td>24,1</td>
						<td>118,6</td>
						<td>76,4</td>
						<td>4,9×</td>
					</tr>
					<tr>
						<td>Group by 'hotel_cluster'</td>
						<td>31,5</td>
						<td>207,3</td>
						<td>142,8</td>
						<td>6,6×</td>
					</tr>
					<tr>
						<td>Total ETL Time</td>
						<td>73,9</td>
						<td>450,6</td>
						<td>308,4</td>
						<td>6,1×</td>
					</tr>
					<tr>
						<td>Peak RAM Consumption</td>
						<td>4,8 GB</td>
						<td>10,2 GB</td>
						<td>8,7 GB</td>
						<td>53% savings</td>
					</tr>
				</table>
			</table-wrap>
			<p>Note: All measurements — average of 3 runs; PySpark is running in local mode without cluster </p>
			<p>[4]</p>
			<p>Figure 1 shows the dependence of the execution time of ETL operations on the amount of data.</p>
			<fig id="F1">
				<label>Figure 1</label>
				<caption>
					<p>ETL Runtime (sec) based on data volume (1M to 10M rows)</p>
				</caption>
				<alt-text>ETL Runtime (sec) based on data volume (1M to 10M rows)</alt-text>
				<graphic ns0:href="/media/images/2026-06-20/6e422a80-f90c-4a2e-9404-99b29e7e40fd.png"/>
			</fig>
			<p>[5]</p>
			<p>Thus, the Polars library was chosen to further assess the quality of machine learning models.</p>
			<p>Table 2 shows the metrics of models trained on data prepared through Polars.</p>
			<table-wrap id="T2">
				<label>Table 2</label>
				<caption>
					<p>Quality of models (on a test sample of 1,2 million records)</p>
				</caption>
				<table>
					<tr>
						<td>Task</td>
						<td>Metric</td>
						<td>Value</td>
						<td>Baseline</td>
					</tr>
					<tr>
						<td>Regression</td>
						<td>RMSE (км)</td>
						<td>1250,4</td>
						<td>2100,7</td>
					</tr>
					<tr>
						<td>R²</td>
						<td>0,63</td>
						<td>-</td>
					</tr>
					<tr>
						<td>Clustering</td>
						<td>Silhouette Score</td>
						<td>0,42</td>
						<td>0,0 (random)</td>
					</tr>
					<tr>
						<td>Inertia</td>
						<td>1,87e+9</td>
						<td>-</td>
					</tr>
					<tr>
						<td>Classification</td>
						<td>Accuracy</td>
						<td>0,68</td>
						<td>0,58 (share is_booking = 1)</td>
					</tr>
					<tr>
						<td>F1-score (macro)</td>
						<td>0,32</td>
						<td>-</td>
					</tr>
					<tr>
						<td>AUC-ROC</td>
						<td>0,61</td>
						<td>-</td>
					</tr>
				</table>
			</table-wrap>
			<p>All models were trained on the same features prepared through Polars </p>
			<p>[6][7]</p>
			<p>Figure 2 shows a visualization of the clustering results of user queries.</p>
			<fig id="F2">
				<label>Figure 2</label>
				<caption>
					<p>Query segmentation by number of adults and children</p>
				</caption>
				<alt-text>Query segmentation by number of adults and children</alt-text>
				<graphic ns0:href="/media/images/2026-06-20/7e72d939-0f7f-4562-aa9d-b439edf55e10.png"/>
			</fig>
			<p>– Cluster 0 corresponds to solo and business trips (average 1 adult, 0 children);</p>
			<p>– Cluster 1 combines couples (mean 2 adults, 0 children);</p>
			<p>– Cluster 2 represents large companies or groups of friends (on average 3 or more adults without children);</p>
			<p>– Cluster 3 corresponds to family trips (an average of 2,3 adults and 1,1 children per booking).</p>
			<p>Fractional values in the description of clusters 0 and 3 reflect mathematical centroids (arithmetic average for all cluster records), and not the literal number of people [8].</p>
			<p>4. Discussion</p>
			<p>The obtained quantitative data presented in Table 1 and Figure 1 clearly confirm the hypothesis: Polars significantly outperforms Pandas in terms of performance when processing large tables. Specifically:</p>
			<p>– Average speedup: 6,1× in time;</p>
			<p>– Memory savings: 2,1× (4,8 GB versus 10,2 GB);</p>
			<p>– Resistance to data growth — linear complexity even at 10 million rows.</p>
			<p>This is achieved by:</p>
			<p>– Lazy execution model: query plan optimization reduces the number of data passes;</p>
			<p>– Vectorized operations on Rust: minimizing overhead from the Python interpreter;</p>
			<p>– Native Apache Arrow support: efficient data transfer between stages.</p>
			<p>Comparison with PySpark shows that for tasks on one node, Polars is faster and easier to use than a distributed system. This makes it ideal for analysts without access to clusters.</p>
			<p>It is important to note that high ETL performance does not lead to a loss of data informativeness for subsequent stages. As shown in Table 2, the model metrics are within the range characteristic of baseline algorithms for this dataset, confirming the correctness of preprocessing and the preservation of statistical distributions. For example, for the regression task, RMSE = 1250,4 km is a 40% improvement over the baseline prediction (average orig_destination_distance), which is in line with previous studies on big data analysis in the tourism and hospitality sector </p>
			<p>[9][10][11]</p>
			<p>For future work, the following are promising:</p>
			<p>– Integration of Polars with onnxruntime for native inference of models without conversion to Pandas;</p>
			<p>– Using window functions to create complex features (for example, moving averages per user);</p>
			<p>– Comparison with Modin and Vaex under the same conditions.</p>
			<p>5. Conclusion</p>
			<p>The purpose of this study was to quantitatively verify the advantages of Polars over traditional tools in the analysis of the large-scale Expedia Hotel Recommendations dataset. The results presented in Tables 1–2 and Figures 1–2 clearly confirm:</p>
			<p>– Polars accelerates ETL stages 6,1 times compared to Pandas;</p>
			<p>– Reduces RAM consumption by 53%;</p>
			<p>– Preserves feature informativeness for machine learning tasks (RMSE = 1250,4, accuracy = 0,68);</p>
			<p>– Is a practical alternative to both Pandas and local PySpark.</p>
			<p>Thus, Polars deservedly occupies a place in the modern Data Science stack as a tool for high-performance, reproducible and pure data analysis. Switching to Polars allows analysts to reduce iteration times from hours to minutes - without compromising on accuracy and convenience.</p>
		</sec>
		<sec sec-type="supplementary-material">
			<title>Additional File</title>
			<p>The additional file for this article can be found as follows:</p>
			<supplementary-material xmlns:xlink="http://www.w3.org/1999/xlink" id="S1" xlink:href="https://doi.org/10.5334/cpsy.78.s1">
				<!--[<inline-supplementary-material xlink:title="local_file" xlink:href="https://research-journal.org/media/articles/25582.docx">25582.docx</inline-supplementary-material>]-->
				<!--[<inline-supplementary-material xlink:title="local_file" xlink:href="https://research-journal.org/media/articles/25582.pdf">25582.pdf</inline-supplementary-material>]-->
				<label>Online Supplementary Material</label>
				<caption>
					<p>
						Further description of analytic pipeline and patient demographic information. DOI:
						<italic>
							<uri>https://doi.org/10.60797/IRJ.2026.170.33</uri>
						</italic>
					</p>
				</caption>
			</supplementary-material>
		</sec>
	</body>
	<back>
		<ack>
			<title>Acknowledgements</title>
			<p>The authors express their gratitude to the editorial staff!</p>
		</ack>
		<sec>
			<title>Competing Interests</title>
			<p/>
		</sec>
		<ref-list>
			<ref id="B1">
				<label>1</label>
				<mixed-citation publication-type="confproc">Expedia Hotel Recommendations // Kaggle. — 2016. — URL: https://www.kaggle.com/competitions/expedia-hotel-recommendations/data (accessed: 15.05.2026).</mixed-citation>
			</ref>
			<ref id="B2">
				<label>2</label>
				<mixed-citation publication-type="confproc">Ilyukhin D.V. Razrabotka metoda analiza avtomobil'nogo rynka s ispol'zovaniem biblioteki Pandas [Development of a method for analyzing the automotive market using the Pandas library] / D.V. Ilyukhin, V.Yu. Ilyichev // Naukoemkie tekhnologii v priboro- i mashinostroenii i razvitie innovacionnoj deyatel'nosti v vuze [High-tech technologies in instrument and mechanical engineering and the development of innovative activities at the university] : proceedings of the Regional Scientific and Technical Conference : in 2 vol. — Moscow : Bauman Moscow State Technical University, 2026. — P. 346–351. [in Russian]</mixed-citation>
			</ref>
			<ref id="B3">
				<label>3</label>
				<mixed-citation publication-type="confproc">DataFrames for the new era // Polars. — URL: https://pola.rs/ (accessed: 15.05.2026).</mixed-citation>
			</ref>
			<ref id="B4">
				<label>4</label>
				<mixed-citation publication-type="confproc">Yegorov I.G. Python fuzzing for trustworthy machine learning frameworks / I.G. Yegorov, E.A. Kobrin, D.A. Parygina [et al.] // Zapiski nauchnykh seminarov Sankt-Peterburgskogo otdeleniya matematicheskogo instituta im. V.A. Steklova RAN [Proceedings of Scientific Seminars of the St. Petersburg Department of the Steklov Mathematical Institute of the Russian Academy of Sciences]. — 2023. — Vol. 530. — P. 38–50.</mixed-citation>
			</ref>
			<ref id="B5">
				<label>5</label>
				<mixed-citation publication-type="confproc">Kosova K.A. Ispol'zovanie intellektual'nykh algoritmov pri prognozirovanii bronirovaniya nomerov v otyelyakh [Using intelligent algorithms to predict hotel reservations] / K.A. Kosova, V.Yu. Ilyichev // Sistemnyj administrator [System Administrator]. — 2025. — № 11 (276). — P. 92–96. [in Russian]</mixed-citation>
			</ref>
			<ref id="B6">
				<label>6</label>
				<mixed-citation publication-type="confproc">Polars: Extremely fast Query Engine for DataFrames, written in Rust // PyPI. — URL: https://pypi.org/project/polars/ (accessed: 15.05.2026).</mixed-citation>
			</ref>
			<ref id="B7">
				<label>7</label>
				<mixed-citation publication-type="confproc">Frolov A.A. Sravnenie pol'zovatel'skoj realizacii linejnoj regressii i biblioteki scikit-learn [Comparison of a custom implementation of linear regression and the scikit-learn library] / A.A. Frolov // Informacionnye tekhnologii i inzhiniring [Information Technology and Engineering] : proceedings of the International Youth Scientific and Practical Conference. — Belgorod, 2025. — P. 222–227. [in Russian]</mixed-citation>
			</ref>
			<ref id="B8">
				<label>8</label>
				<mixed-citation publication-type="confproc">Ilyichev V.Yu. Ispol'zovanie &quot;lenivykh vychislenij&quot; pri sozdanii programmnykh produktov na yazyke Python [Using lazy computing to create Python software] / V.Yu. Ilyichev, D.S. Kashirin // Voprosy nauki [Issues of Science]. — 2022. — № 4. — P. 17–21. [in Russian]</mixed-citation>
			</ref>
			<ref id="B9">
				<label>9</label>
				<mixed-citation publication-type="confproc">Mariani M.M. Big Data and Analytics in Hospitality and Tourism: A Systematic Literature Review / M.M. Mariani, R. Baggio // International Journal of Contemporary Hospitality Management. — 2022. — Vol. 34. — № 1. — P. 231–258.</mixed-citation>
			</ref>
			<ref id="B10">
				<label>10</label>
				<mixed-citation publication-type="confproc">Mozzillo A. Evaluation of Dataframe Libraries for Data Preparation on a Single Machine / A. Mozzillo, A. Aslam, S. Bergamaschi [et al.] // Proceedings of the 28th International Conference on Extending Database Technology (EDBT). — 2025. — P. 337–349. — DOI: 10.48786/edbt.2025.27.</mixed-citation>
			</ref>
			<ref id="B11">
				<label>11</label>
				<mixed-citation publication-type="confproc">Dinesh L. An efficient hybrid optimization of ETL process in data warehouse of cloud architecture / L. Dinesh, K.G. Devi // Journal of Cloud Computing. — 2024. — Vol. 13. — № 1. — DOI: 10.1186/s13677-023-00571-y. — EDN KRYFZH.</mixed-citation>
			</ref>
		</ref-list>
	</back>
	<fundings/>
</article>