This paper uses Python programming to improve the existing price index method and calculate the integration level of the forest products market in China. Based on the model, the influencing factors of domestic forest product market integration were examined empirically. The results show that the integration degree of the forest product market in recent years lags behind the average level in China. In this paper, the improvement of the existing price index method can calculate the level of market integration more quickly and accurately, and this improvement has obvious advantages in the case of a large amount of data. In terms of development, the overall pattern shows an increasing trend, and the eastern, central, and western provinces are gradually converging, although the differences between provinces continue to expand. In terms of influencing factors, the coefficient of the local government’s emphasis on forestry, the prosperity of international trade in forest products, and highway density were significantly positive factors, while the number of foreign investors and the railway density had no significant effects. In this paper, the optimization of the measurement method of market integration makes it easier for scholars to obtain the data on the level of market integration and promote in-depth research in the field of market integration.