Contextualized Data-Wrangling Code Generation in Computational Notebooks
Not on the map. Why?
Abstract (arXiv)
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...
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Builds on 58 of its 100 references that are in the map. First posted on arXiv 20 Sep 2024.
Builds on
58 of 100 references.
References · 58
- 2017Attention Is All You Needcited by 59,932
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,346
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
- 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,120
38 more
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
- 2021Measuring Coding Challenge Competence With APPScited by 879
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
- 2017Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learningcited by 679
- 2019Unified Language Model Pre-training for Natural Language Understanding and Generationcited by 668
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
- 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 468
- 2021Unified Pre-training for Program Understanding and Generationcited by 361
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
- 2022The Stack: 3 TB of permissively licensed source codecited by 354
- 2022Efficient Training of Language Models to Fill in the Middlecited by 248
- 2018Learning to Mine Aligned Code and Natural Language Pairs from Stack Overflowcited by 165
- 2022Natural Language to Code Translation with Executioncited by 122
- 2018Mapping Language to Code in Programmatic Contextcited by 104
- 2021Jigsaw: Large Language Models meet Program Synthesiscited by 103
- 2022ReCode: Robustness Evaluation of Code Generation Modelscited by 100
- 2018NL2Bash: A Corpus and Semantic Parser for Natural Language Interface to the Linux Operating Systemcited by 97
- 2022Execution-Based Evaluation for Open-Domain Code Generationcited by 89
- 2022Natural Language to Code Generation in Interactive Data Science Notebookscited by 86
- 2016Neuro-Symbolic Program Synthesiscited by 84
- 2021CoSQA: 20,000+ Web Queries for Code Search and Question Answeringcited by 74
- 2020Deep Learning for Source Code Modeling and Generation: Models, Applications and Challengescited by 55
- 2022XLCoST: A Benchmark Dataset for Cross-lingual Code Intelligencecited by 54
- 2019JuICe: A Large Scale Distantly Supervised Dataset for Open Domain Context-based Code Generationcited by 49
- 2023What Makes Good In-context Demonstrations for Code Intelligence Tasks with LLMs?cited by 47
- 2022MCoNaLa: A Benchmark for Code Generation from Multiple Natural Languagescited by 41
- 2022No More Fine-Tuning? An Experimental Evaluation of Prompt Tuning in Code Intelligencecited by 41
- 2021Latent Execution for Neural Program Synthesiscited by 35
- 2023Data Formulator: AI-powered Concept-driven Visualization Authoringcited by 31
- 2020TF-Coder: Program Synthesis for Tensor Manipulationscited by 27
- 2021Documentation Matters: Human-Centered AI System to Assist Data Science Code Documentation in Computational Notebookscited by 17
- 2021The Art and Practice of Data Science Pipelines: A Comprehensive Study of Data Science Pipelines In Theory, In-The-Small, and In-The-Largecited by 17
- 2022Mixed-modality Representation Learning and Pre-training for Joint Table-and-Text Retrieval in OpenQAcited by 17
- 2023Your Code Secret Belongs to Me: Neural Code Completion Tools Can Memorize Hard-Coded Credentialscited by 17
- 2021On The Ingredients of an Effective Zero-shot Semantic Parsercited by 13
- 2023From Words to Code: Harnessing Data for Program Synthesis from Natural Languagecited by 11
- 2024Enhancing LLM-Based Coding Tools through Native Integration of IDE-Derived Static Contextcited by 10
50 most cited of 58 All 58 (JSON)
Built on by
Citing papers per year: 2024: 1; 2025: 2.
3 papers.
- 2025LLM/Agent-as-Data-Analyst: A Surveycited by 15
- 2024Data Analysis in the Era of Generative AIcited by 6
- 2025CRABS: A syntactic-semantic pincer strategy for bounding LLM interpretation of Python notebookscited by 1
- 2025LLM/Agent-as-Data-Analyst: A Survey28 Sep 2025
- 2025CRABS: A syntactic-semantic pincer strategy for bounding LLM interpretation of Python notebooks15 Jul 2025
- 2024Data Analysis in the Era of Generative AI27 Sep 2024