How to use a specific version of a package in Jupyter notebook

I am trying to use a package named Methylprep. It is using “append” function for dataframe, which has been removed since pandas 2.0.

Now the version of pandas installed in my pc is 2.2.2. And I am using jupyter notebook to process my scripts. Is there a way to allow me use specific version of pandas (maybe 1.8) in the script I am currently testing in jupyter notebook ?

Thank you very much !!

import methylprep
from pathlib import Path
filepath = Path('test/')

data_containers = methylprep.run_pipeline(filepath, array_type=None, export=True, manifest_filepath=None, sample_sheet_filepath='test/MethylationEPIC_Sample_Sheet_B.csv')
INFO:methylprep.processing.pipeline:Running pipeline in: test
Reading IDATs: 100%|█████████████████████████████████████████████████████████████████████| 1/1 [00:41<00:00, 41.74s/it]
INFO:methylprep.files.manifests:Reading manifest file: HumanMethylationEPIC_manifest_v2.csv
Processing samples:   0%|                                                                        | 0/1 [00:01<?, ?it/s]
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
~AppDataLocalTempipykernel_92682686656903.py in ?()
----> 1 data_containers = methylprep.run_pipeline(filepath, array_type=None, export=True, manifest_filepath=None, sample_sheet_filepath='test/MethylationEPIC_Sample_Sheet_B.csv')

~AppDataLocalProgramsPythonPython311Libsite-packagesmethylprepprocessingpipeline.py in ?(data_dir, array_type, export, manifest_filepath, sample_sheet_filepath, sample_name, betas, m_value, make_sample_sheet, batch_size, save_uncorrected, save_control, meta_data_frame, bit, poobah, export_poobah, poobah_decimals, poobah_sig, low_memory, sesame, quality_mask, pneg_ecdf, file_format, **kwargs)
    327 
    328         batch_data_containers = []
    329         export_paths = set() # inform CLI user where to look
    330         for idat_dataset_pair in tqdm(idat_datasets, total=len(idat_datasets), desc="Processing samples"):
--> 331             data_container = SampleDataContainer(
    332                 idat_dataset_pair=idat_dataset_pair,
    333                 manifest=manifest,
    334                 retain_uncorrected_probe_intensities=save_uncorrected,

~AppDataLocalProgramsPythonPython311Libsite-packagesmethylprepprocessingpipeline.py in ?(self, idat_dataset_pair, manifest, retain_uncorrected_probe_intensities, bit, pval, poobah_decimals, poobah_sig, do_noob, quality_mask, switch_probes, do_nonlinear_dye_bias, debug, sesame, pneg_ecdf, file_format)
    586         self.manifest = manifest # used by inter_channel_switch only.
    587         if self.switch_probes:
    588             # apply inter_channel_switch here; uses raw_dataset and manifest only; then updates self.raw_dataset
    589             # these are read from idats directly, not SigSet, so need to be modified at source.
--> 590             infer_type_I_probes(self, debug=self.debug)
    591 
    592         super().__init__(self.sample, self.green_idat, self.red_idat, self.manifest, self.debug)
    593         # SigSet defines all probe-subsets, then SampleDataContainer adds them with super(); no need to re-define below.

~AppDataLocalProgramsPythonPython311Libsite-packagesmethylprepprocessinginfer_channel_switch.py in ?(container, debug)
     15     -- runs in SampleDataContainer.__init__ this BEFORE qualityMask step, so NaNs are not present
     16     -- changes raw_data idat probe_means
     17     -- runs on raw_dataset, before meth-dataset is created, so @IR property doesn't exist yet; but get_infer has this"""
     18     # this first step combines all I-red and I-green channel intensities, so IG+oobG and IR+oobR.
---> 19     channels = get_infer_channel_probes(container.manifest, container.green_idat, container.red_idat, debug=debug)
     20     green_I_channel = channels['green']
     21     red_I_channel = channels['red']
     22     ## NAN probes occurs when manifest is not complete

~AppDataLocalProgramsPythonPython311Libsite-packagesmethylprepprocessinginfer_channel_switch.py in ?(manifest, green_idat, red_idat, debug)
    167     red_in_band['meth'] = oobG_unmeth
    168     green_in_band['unmeth'] = oobR_meth
    169 
    170     # next, add the green-in-band to oobG and red-in-band to oobR
--> 171     oobG_IG = oobG.append(green_in_band).sort_index()
    172     oobR_IR = oobR.append(red_in_band).sort_index()
    173 
    174     # channel swap requires a way to update idats with illumina_ids

~AppDataLocalProgramsPythonPython311Libsite-packagespandascoregeneric.py in ?(self, name)
   6295             and name not in self._accessors
   6296             and self._info_axis._can_hold_identifiers_and_holds_name(name)
   6297         ):
   6298             return self[name]
-> 6299         return object.__getattribute__(self, name)

AttributeError: 'DataFrame' object has no attribute 'append'

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật