paper-with-me

홈 › Papers

Contextualized Data-Wrangling Code Generation in Computational Notebooks

2024-09-20 · JunJie Huang, Daya Guo, Chenglong Wang, Jiazhen Gu, Shuai Lu, Jeevana Priya Inala, Cong Yan, Jianfeng Gao, Nan Duan, Michael R. Lyu

Data wrangling, the process of preparing raw data for further analysis in computational notebooks, is a crucial yet time-consuming step in data science. Code generation has the potential to automate the data wrangling process to reduce analysts' overhead by translating user intents into executable code. Precisely generating data wrangling code necessitates a comprehensive consideration of the rich context present in notebooks, including textual context, code context and data context. However, notebooks often interleave multiple non-linear analysis tasks into linear sequence of code blocks, where the contextual dependencies are not clearly reflected. Directly training models with source code blocks fails to fully exploit the contexts for accurate wrangling code generation. To bridge the gap, we aim to construct a high quality datasets with clear and rich contexts to help training models for data wrangling code generation tasks. In this work, we first propose an automated approach, CoCoMine to mine data-wrangling code generation examples with clear multi-modal contextual dependency. It first adopts data flow analysis to identify the code blocks containing data wrangling codes. Then, CoCoMine extracts the contextualized datawrangling code examples through tracing and replaying notebooks. With CoCoMine, we construct CoCoNote, a dataset containing 58,221 examples for Contextualized Data-wrangling Code generation in Notebooks. To demonstrate the effectiveness of our dataset, we finetune a range of pretrained code models and prompt various large language models on our task. Furthermore, we also propose DataCoder, which encodes data context and code&textual contexts separately to enhance code generation. Experiment results demonstrate the significance of incorporating data context in data-wrangling code generation and the effectiveness of our model. We release code and data at url...

📄 PDF Abstract BibTeX arXiv:2409.13551

Code (1)

Jun-jie-Huang/CoCoNote 공식 구현

Tasks

Code Generation

Similar Papers 제목 키워드 기반

Natural Language to Code Generation in Interactive Data Science Notebooks

2022-12-19 · Pengcheng Yin, Wen-Ding Li, Kefan Xiao, Abhishek Rao 외

Computational notebooks, such as Jupyter notebooks, are interactive computing environments that are ubiquitous among data scientists to perform data wrangling and analytic tasks. To measure the performance of AI pair pro…

Code GenerationDiversityLanguage ModelingLanguage Modelling

Data Wrangling Task Automation Using Code-Generating Language Models

2025-02-05 · Ashlesha Akella, Krishnasuri Narayanam

Ensuring data quality in large tabular datasets is a critical challenge, typically addressed through data wrangling tasks. Traditional statistical methods, though efficient, cannot often understand the semantic context a…

Imputation

CoreGen: Contextualized Code Representation Learning for Commit Message Generation

2020-07-14 · Lun Yiu Nie, Cuiyun Gao, Zhicong Zhong, Wai Lam 외

Automatic generation of high-quality commit messages for code commits can substantially facilitate software developers' works and coordination. However, the semantic gap between source code and natural language poses a m…

Representation LearningText Generation

Minimalist Data Wrangling with Python

2022-11-09 · Marek Gagolewski

Minimalist Data Wrangling with Python is envisaged as a student's first introduction to data science, providing a high-level overview as well as discussing key concepts in detail. We explore methods for cleaning data gat…

Dimensionality Reduction

General-purpose Declarative Inductive Programming with Domain-Specific Background Knowledge for Data Wrangling Automation

2018-09-26 · Lidia Contreras-Ochando, César Ferri, José Hernández-Orallo, Fernando Martínez-Plumed 외

Given one or two examples, humans are good at understanding how to solve a problem independently of its domain, because they are able to detect what the problem is and to choose the appropriate background knowledge accor…