This paper presents TableMind, a novel agent based on a Large-Scale Language Model (LLM), focusing on table reasoning. TableMind autonomously performs multi-step tool invocations and writes and executes data analysis code in a secure sandbox environment, enabling accurate numerical inference. Furthermore, it adaptively adjusts strategies through higher-order capabilities such as planning and self-reflection. Based on a powerful pre-trained language model, we adopt a two-step fine-tuning paradigm: supervised learning fine-tuning for high-quality inference paths and reinforcement learning fine-tuning to optimize multi-objective strategies. Specifically, we propose Rank-Aware Policy Optimization (RAPO), which increases update weights when the output probability of a high-quality path is lower than that of a low-quality path, thereby guiding the model to obtain more accurate answers. Extensive experiments on several key benchmarks demonstrate that TableMind outperforms competing baseline models, demonstrating significant improvements in both inference accuracy and computational precision.